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 03:23zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 14:56C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 14:56018,718,1579,150,0001,049,0002,121,728expected "10000", got "9984 "stderr
2Sep 7, 2026 14:56019,060,0279,502,0001,004,0002,121,728expected "10000", got "9984 "stderr
3Sep 7, 2026 14:56018,620,0039,147,0001,005,0002,121,728expected "10000", got "9984 "stderr
4May 29, 2025 03:2319,79322,570,9476,928,000989,0002,506,752
5May 29, 2025 03:2319,83526,277,7745,951,0001,983,0002,527,232
6May 29, 2025 03:2319,86327,087,3815,959,0001,986,0002,527,232
7May 29, 2025 03:2319,87323,949,8466,956,000993,0002,527,232
8May 29, 2025 03:2319,91023,940,7835,973,0001,991,0002,420,736
9May 29, 2025 03:2319,91323,536,3885,974,0001,991,0002,527,232
10May 29, 2025 03:2320,07322,655,3617,026,0001,003,0002,416,640
11May 29, 2025 03:2320,18522,695,8926,056,0002,018,0002,527,232
12May 29, 2025 03:2320,22022,415,4606,066,0002,022,0002,494,464