Find maximum submatrix size .
for ( int i = 0 ; i < C ; ++ i ) ans = max ( ans , b [ i ] * ( C - i ) ) ; } return ans ; } void findMax1s ( int mat [ R ] [ C ] ) { int ryt [ R + 2 ] [ C + 2 ] , dwn [ R + 2 ] [ C + 2 ] ; memset ( ryt , 0 , sizeof ryt ) ; memset ( dwn , 0 , sizeof dwn ) ; precompute ( mat , ryt , dwn ) ;