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 ] , dwn [ ] [ ] = new int [ R + 2 ] [ C + 2 ] ; precompute ( mat , ryt , dwn ) ;