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 10:00M-RochatM-RochatScore: 12,040Success
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 10:0111,75515,972,2233,672,0001,030,0002,121,728
2May 17, 2026 10:0111,90213,682,4263,725,0001,036,0002,121,728
3May 17, 2026 10:0112,01715,032,6903,680,0001,127,0002,121,728
4May 17, 2026 10:0112,02514,322,3223,784,0001,026,0002,121,728
5May 17, 2026 10:0112,04013,934,8673,726,0001,090,0002,121,728
6May 17, 2026 10:0112,08014,786,3703,594,0001,238,0002,121,728
7May 17, 2026 10:0112,08715,712,1773,729,0001,106,0002,121,728
8May 17, 2026 10:0112,22016,565,5833,780,0001,108,0002,121,728
9May 17, 2026 10:0112,40516,716,4633,840,0001,122,0002,121,728