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:41M-RochatM-RochatScore: 21,582Success
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:4321,23719,930,7837,405,0001,090,0002,121,728
2May 20, 2026 17:4321,25019,695,6067,408,0001,092,0002,121,728
3May 20, 2026 17:4321,37518,650,8627,506,0001,044,0002,121,728
4May 20, 2026 17:4321,53219,644,5887,526,0001,087,0002,121,728
5May 20, 2026 17:4321,58221,676,9787,594,0001,039,0002,121,728
6May 20, 2026 17:4321,60520,389,5367,582,0001,060,0002,121,728
7May 20, 2026 17:4321,67720,360,4897,622,0001,049,0002,121,728
8May 20, 2026 17:4321,71522,242,1717,575,0001,111,0002,121,728
9May 20, 2026 17:4321,78218,634,8487,681,0001,032,0002,121,728