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:52M-RochatM-RochatScore: 14,620Success
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:5414,38716,963,2414,667,0001,088,0002,121,728
2May 20, 2026 17:5414,43215,903,2484,718,0001,055,0002,121,728
3May 20, 2026 17:5414,44015,927,4654,671,0001,105,0002,121,728
4May 20, 2026 17:5414,46517,635,5034,696,0001,090,0002,121,728
5May 20, 2026 17:5414,62016,056,6634,787,0001,061,0002,121,728
6May 20, 2026 17:5414,67717,170,0344,823,0001,048,0002,121,728
7May 20, 2026 17:5414,71716,432,1034,818,0001,069,0002,121,728
8May 20, 2026 17:5414,72717,970,3454,828,0001,063,0002,121,728
9May 20, 2026 17:5414,79516,491,6184,873,0001,045,0002,121,728