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 17:19Aleksei ShahoikaAleksei ShahoikaScore: 26,985Success
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 17:2026,57026,726,2669,577,0001,051,0002,363,392
2May 9, 2026 17:2026,88227,620,3109,586,0001,167,0002,371,584
3May 9, 2026 17:2026,89525,307,0719,594,0001,164,0002,367,488
4May 9, 2026 17:2026,92228,733,5769,648,0001,121,0002,375,680
5May 9, 2026 17:2026,98525,990,4809,721,0001,073,0002,363,392
6May 9, 2026 17:2027,12026,919,7359,724,0001,124,0002,363,392
7May 9, 2026 17:2027,25028,375,1849,700,0001,200,0002,367,488
8May 9, 2026 17:2027,28232,526,4399,746,0001,167,0002,355,200
9May 9, 2026 17:2027,28228,436,7289,745,0001,168,0002,359,296