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 18:56M-RochatM-RochatScore: 16,827Success
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 18:5716,58016,472,2894,385,0002,247,0002,121,728
2May 16, 2026 18:5716,60517,362,9344,398,0002,244,0002,121,728
3May 16, 2026 18:5716,63715,557,9984,417,0002,238,0002,121,728
4May 16, 2026 18:5716,78015,567,6224,477,0002,235,0002,121,728
5May 16, 2026 18:5716,82717,882,0805,387,0001,344,0002,121,728
6May 16, 2026 18:5716,84016,548,6844,475,0002,261,0002,121,728
7May 16, 2026 18:5716,86218,571,8704,442,0002,303,0002,121,728
8May 16, 2026 18:5717,09715,712,2094,536,0002,303,0002,121,728
9May 16, 2026 18:5717,19215,731,5604,538,0002,339,0002,121,728