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 27, 2025 03:06zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 15:08C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 15:08020,363,31512,081,00002,121,728expected "10000", got "9984 "stderr
2Sep 7, 2026 15:08020,606,97811,138,0001,054,0002,121,728expected "10000", got "9984 "stderr
3Sep 7, 2026 15:08020,512,63512,073,00002,121,728expected "10000", got "9984 "stderr
4May 27, 2025 03:0622,61333,771,3628,040,0001,005,0002,420,736
5May 27, 2025 03:0622,65329,607,8718,055,0001,006,0002,420,736
6May 27, 2025 03:0622,66326,124,5418,058,0001,007,0002,527,232
7May 27, 2025 03:0622,70824,291,1038,074,0001,009,0002,506,752
8May 27, 2025 03:0622,79822,438,0908,106,0001,013,0002,416,640
9May 27, 2025 03:0622,86025,269,1148,128,0001,016,0002,416,640
10May 27, 2025 03:0622,96329,832,8958,165,0001,020,0002,412,544
11May 27, 2025 03:0622,99026,535,3177,153,0002,043,0002,424,832
12May 27, 2025 03:0622,99528,184,0608,176,0001,022,0002,416,640