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 16, 2026 19:04M-RochatM-RochatScore: 15,875Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 16, 2026 19:0515,53716,186,7064,974,0001,241,0002,121,728
2May 16, 2026 19:0515,68215,854,7795,020,0001,253,0002,121,728
3May 16, 2026 19:0515,71715,202,6375,032,0001,255,0002,121,728
4May 16, 2026 19:0515,72018,187,9565,032,0001,256,0002,121,728
5May 16, 2026 19:0515,87516,199,1605,082,0001,268,0002,121,728
6May 16, 2026 19:0515,89216,600,6444,241,0002,116,0002,121,728
7May 16, 2026 19:0515,91017,092,7964,246,0002,118,0002,121,728
8May 16, 2026 19:0516,03215,508,3494,255,0002,158,0002,121,728
9May 16, 2026 19:0516,18515,281,9274,316,0002,158,0002,121,728