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 9, 2026 19:35Aleksei ShahoikaAleksei ShahoikaScore: 24,435Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 9, 2026 19:3721,36224,947,5477,452,0001,093,0002,363,392
2May 9, 2026 19:3721,58224,430,3867,512,0001,121,0002,359,296
3May 9, 2026 19:3724,10026,455,1468,479,0001,161,0002,367,488
4May 9, 2026 19:3724,42524,849,7648,693,0001,077,0002,355,200
5May 9, 2026 19:3724,43527,989,1748,644,0001,130,0002,355,200
6May 9, 2026 19:3724,63726,625,2028,693,0001,162,0002,359,296
7May 9, 2026 19:3724,66527,326,6628,701,0001,165,0002,371,584
8May 9, 2026 19:3724,68027,227,3448,661,0001,211,0002,359,296
9May 9, 2026 19:3724,80227,231,4978,714,0001,207,0002,367,488