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 9, 2026 18:47E SequeiraE SequeiraScore: 146,320Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 9, 2026 18:4990,09055,095,84134,968,0001,068,0002,375,680
2May 9, 2026 18:49140,16274,176,00955,002,0001,063,0002,371,584
3May 9, 2026 18:49145,56778,587,92957,167,0001,060,0002,379,776
4May 9, 2026 18:49145,65074,652,51857,205,0001,055,0002,375,680
5May 9, 2026 18:49146,32074,772,88257,464,0001,064,0002,379,776
6May 9, 2026 18:49147,44575,454,55357,964,0001,014,0002,383,872
7May 9, 2026 18:49148,20779,097,78258,273,0001,010,0002,375,680
8May 9, 2026 18:49168,13082,181,49066,229,0001,023,0002,379,776
9May 9, 2026 18:49189,68093,233,94474,807,0001,065,0002,375,680