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 17, 2026 01:27M-RochatM-RochatScore: 13,092Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 17, 2026 01:3312,99215,492,5434,149,0001,048,0002,121,728
2May 17, 2026 01:3313,00719,104,6024,174,0001,029,0002,121,728
3May 17, 2026 01:3313,02215,253,4744,191,0001,018,0002,121,728
4May 17, 2026 01:3313,03216,026,7884,187,0001,026,0002,121,728
5May 17, 2026 01:3313,09217,145,3254,198,0001,039,0002,121,728
6May 17, 2026 01:3313,10014,144,2184,204,0001,036,0002,121,728
7May 17, 2026 01:3313,11516,411,1594,218,0001,028,0002,121,728
8May 17, 2026 01:3313,14217,123,4794,219,0001,038,0002,121,728
9May 17, 2026 01:3313,26514,709,5964,291,0001,015,0002,121,728