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 19, 2026 12:20M-RochatM-RochatScore: 776,427Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 19, 2026 12:23775,735321,274,044298,995,00011,299,0002,113,536
2May 19, 2026 12:23775,925320,412,407298,186,00012,184,0002,113,536
3May 19, 2026 12:23775,930320,720,372299,119,00011,253,0002,113,536
4May 19, 2026 12:23775,965322,376,461299,083,00011,303,0002,113,536
5May 19, 2026 12:23776,427320,195,662299,233,00011,338,0002,113,536
6May 19, 2026 12:23776,685320,551,575299,367,00011,307,0002,113,536
7May 19, 2026 12:23776,705322,304,033299,357,00011,325,0002,113,536
8May 19, 2026 12:23777,710320,168,760299,737,00011,347,0002,113,536
9May 19, 2026 12:23778,522320,586,308300,126,00011,283,0002,113,536