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 13:45M-RochatM-RochatScore: 27,190Success
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 13:4626,08519,451,1348,119,0002,315,0002,117,632
2May 16, 2026 13:4626,55719,468,1048,501,0002,122,0002,113,536
3May 16, 2026 13:4626,59520,439,5358,276,0002,362,0002,121,728
4May 16, 2026 13:4626,81719,655,3908,585,0002,142,0002,121,728
5May 16, 2026 13:4627,19021,071,8548,703,0002,173,0002,113,536
6May 16, 2026 13:4627,28520,104,2738,733,0002,181,0002,113,536
7May 16, 2026 13:4627,35519,840,6978,756,0002,186,0002,113,536
8May 16, 2026 13:4627,49721,575,8328,801,0002,198,0002,117,632
9May 16, 2026 13:4627,63022,085,7798,846,0002,206,0002,113,536