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 20, 2026 17:32M-RochatM-RochatScore: 203,242Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 20, 2026 17:33202,87792,585,40467,923,00013,228,0002,113,536
2May 20, 2026 17:33202,88093,630,69467,995,00013,157,0002,113,536
3May 20, 2026 17:33202,96590,622,80167,894,00013,292,0002,113,536
4May 20, 2026 17:33203,00291,177,05367,965,00013,236,0002,113,536
5May 20, 2026 17:33203,24291,117,74567,976,00013,321,0002,113,536
6May 20, 2026 17:33203,29791,218,37968,022,00013,297,0002,113,536
7May 20, 2026 17:33203,40793,654,25668,011,00013,352,0002,113,536
8May 20, 2026 17:33203,51593,000,81568,003,00013,403,0002,113,536
9May 20, 2026 17:33203,57591,554,20068,234,00013,196,0002,113,536