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 13:41M-RochatM-RochatScore: 103,530Success
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 13:43101,91752,713,46432,606,0008,161,0002,113,536
2May 16, 2026 13:43102,45252,034,44333,816,0007,165,0002,113,536
3May 16, 2026 13:43102,46051,534,35033,817,0007,167,0002,113,536
4May 16, 2026 13:43102,57049,945,62532,799,0008,229,0002,113,536
5May 16, 2026 13:43103,53050,385,79433,259,0008,153,0002,113,536
6May 16, 2026 13:43104,05750,506,68034,344,0007,279,0002,113,536
7May 16, 2026 13:43104,42753,601,23933,549,0008,222,0002,113,536
8May 16, 2026 13:43104,43252,070,36933,598,0008,175,0002,113,536
9May 16, 2026 13:43105,74751,919,22435,082,0007,217,0002,113,536