Largest Square Submatrix of all 1's C#_user

Find the largest square submatrix consisting entirely of 1s as fast as possible.

Input

A 10,000 x 10,000 matrix of uint8 values (0 or 1) on STDIN.

0, 1, 0, 1, 1
0, 1, 1, 1, 1
0, 0, 1, 0, 0
1, 0, 1, 1, 0

Output

Print the side length of the largest all-ones square submatrix to STDOUT. The answer is guaranteed to be greater than 1.

For the example above, the output is:

2
Back to listMay 29, 2025 01:49zielajzielajError
Source Code

Source code access is restricted. Log in to request access.

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 15:01C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 15:01015,796,3676,401,0001,012,0002,121,728expected "10000", got "255 "stderr
2Sep 7, 2026 15:01015,880,4176,418,0001,015,0002,121,728expected "10000", got "255 "stderr
3Sep 7, 2026 15:01015,819,3696,399,0001,006,0002,121,728expected "10000", got "255 "stderr
4May 29, 2025 01:4920,45324,617,0887,159,0001,022,0002,265,088
5May 29, 2025 01:4920,47025,383,5787,165,0001,023,0002,412,544
6May 29, 2025 01:4920,50522,547,7657,177,0001,025,0002,527,232
7May 29, 2025 01:4920,51525,363,5836,155,0002,051,0002,527,232
8May 29, 2025 01:4920,52321,208,6897,183,0001,026,0002,527,232
9May 29, 2025 01:4920,58022,667,0146,174,0002,058,0002,527,232
10May 29, 2025 01:4920,58526,899,7216,176,0002,058,0002,428,928
11May 29, 2025 01:4920,66324,111,2196,199,0002,066,0002,527,232
12May 29, 2025 01:4920,70823,151,5497,248,0001,035,0002,527,232