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 listJun 11, 2026 08:49Victor MerckléVictor MerckléScore: 6,362Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 11, 2026 08:514,08711,020,7791,635,00002,158,592
2Jun 11, 2026 08:514,84511,098,23501,938,0002,195,456
3Jun 11, 2026 08:515,35011,474,80402,140,0002,158,592
4Jun 11, 2026 08:516,22511,695,9911,279,0001,211,0002,195,456
5Jun 11, 2026 08:516,36211,704,6961,300,0001,245,0002,166,784
6Jun 11, 2026 08:516,60511,863,4381,261,0001,381,0002,195,456
7Jun 11, 2026 08:516,63510,040,1941,293,0001,361,0002,195,456
8Jun 11, 2026 08:516,90712,991,3021,334,0001,429,0002,142,208
9Jun 11, 2026 08:517,08011,992,5981,399,0001,433,0002,195,456