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 10, 2026 04:53E SequeiraE SequeiraScore: 28,292Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 10, 2026 04:5427,89730,210,29910,027,0001,132,0002,383,872
2May 10, 2026 04:5428,09229,712,51510,098,0001,139,0002,383,872
3May 10, 2026 04:5428,22229,447,74210,143,0001,146,0002,371,584
4May 10, 2026 04:5428,28029,626,63610,170,0001,142,0002,383,872
5May 10, 2026 04:5428,29227,763,13410,177,0001,140,0002,379,776
6May 10, 2026 04:5428,31228,716,66910,191,0001,134,0002,375,680
7May 10, 2026 04:5428,48227,923,01710,272,0001,121,0002,367,488
8May 10, 2026 04:5428,50026,069,65710,278,0001,122,0002,375,680
9May 10, 2026 04:5428,63726,161,87810,321,0001,134,0002,371,584