Problem 4016 · Medium

Maximum Area of Two Non-Overlapping Square Submatrices

Try the largest side first. For each side, list the all-one squares and look for two that do not share a cell; the answer is that side squared.

Open the interactive visualisation