Max square matrix with ones