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 02:41zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 15:09C#_user16.59CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 15:10018,803,4809,446,0001,039,0002,121,728expected "10000", got "128 "stderr
2Sep 7, 2026 15:10019,717,2499,455,0001,041,0002,121,728expected "10000", got "128 "stderr
3Sep 7, 2026 15:10018,993,1659,509,0001,052,0002,121,728expected "10000", got "128 "stderr
4May 27, 2025 02:4127,82027,215,11910,117,0001,011,0002,527,232
5May 27, 2025 02:4127,82326,853,98010,118,0001,011,0002,420,736
6May 27, 2025 02:4127,89828,161,46410,145,0001,014,0002,424,832
7May 27, 2025 02:4128,01031,776,55010,186,0001,018,0002,527,232
8May 27, 2025 02:4128,01523,189,52310,188,0001,018,0002,527,232
9May 27, 2025 02:4128,06027,662,2499,184,0002,040,0002,424,832
10May 27, 2025 02:4128,12025,230,23610,226,0001,022,0002,527,232
11May 27, 2025 02:4128,15830,531,17511,263,00002,527,232
12May 27, 2025 02:4128,23025,362,81210,266,0001,026,0002,527,232