Sponsored
Use these hints if you're stuck. Try solving on your own first.
For each column, find the number of consecutive ones ending at each position.
For each row, sort the cumulative ones in non-increasing order and "fit" the largest submatrix.
Solve with full IDE support and test cases