Largest Square Submatrix of all 1's NoSIMD_C#

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 1, 2026 08:44Dominique GarmierDominique GarmierScore: 26,142Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 1, 2026 08:4525,91532,046,6819,330,0001,036,0002,375,680
2May 1, 2026 08:4525,95029,703,6639,342,0001,038,0002,359,296
3May 1, 2026 08:4525,99227,479,6079,358,0001,039,0002,363,392
4May 1, 2026 08:4526,10527,495,6039,398,0001,044,0002,363,392
5May 1, 2026 08:4526,14227,719,3359,412,0001,045,0002,367,488
6May 1, 2026 08:4526,16227,706,1089,419,0001,046,0002,371,584
7May 1, 2026 08:4526,32529,111,2149,477,0001,053,0002,375,680
8May 1, 2026 08:4526,40026,759,9019,504,0001,056,0002,367,488
9May 1, 2026 08:4526,44032,817,5939,519,0001,057,0002,326,528