initialize maxRowSum and maxColSum to be ones matrices