Find maximum submatrix size .
for ( int k = 0 ; k < C ; ++ k ) { ans = Math . Max ( ans , b [ k ] * ( C - k ) ) ; } } return ans ; } static void findMax1s ( int [ , ] mat ) { int [ , ] ryt = new int [ R + 2 , C + 2 ] ; int [ , ] dwn = new int [ R + 2 , C + 2 ] ; precompute ( mat , ryt , dwn ) ;