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 listMar 12, 2026 02:39olliecrowolliecrowScore: 20,070Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 12, 2026 02:3919,93527,893,8615,981,0001,993,0002,359,296
2Mar 12, 2026 02:3919,94523,014,2625,984,0001,994,0002,363,392
3Mar 12, 2026 02:3920,02026,661,0756,006,0002,002,0002,363,392
4Mar 12, 2026 02:3920,02329,869,4616,007,0002,002,0002,371,584
5Mar 12, 2026 02:3920,07025,944,7006,021,0002,007,0002,355,200
6Mar 12, 2026 02:3920,09028,252,6706,027,0002,009,0002,371,584
7Mar 12, 2026 02:3920,10024,602,5736,030,0002,010,0002,371,584
8Mar 12, 2026 02:3920,10524,250,1036,032,0002,010,0002,363,392
9Mar 12, 2026 02:3920,42527,719,8816,128,0002,042,0002,355,200