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 listJan 1, 2026 07:47Josu San MartinJosu San MartinScore: 138,925Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jan 1, 2026 07:47135,84881,234,8048,050,00046,289,0002,392,064
2Jan 1, 2026 07:47136,35581,694,8949,090,00045,452,0002,301,952
3Jan 1, 2026 07:47138,04082,355,23711,043,00044,173,0002,293,760
4Jan 1, 2026 07:47138,19586,727,29810,050,00045,228,0002,301,952
5Jan 1, 2026 07:47138,92582,432,3319,093,00046,477,0002,416,640
6Jan 1, 2026 07:47139,45881,585,92810,957,00044,826,0002,293,760
7Jan 1, 2026 07:47139,77582,122,4859,984,00045,926,0002,297,856
8Jan 1, 2026 07:47142,58077,508,16512,006,00045,026,0002,301,952
9Jan 1, 2026 07:47145,27386,319,52311,020,00047,089,0002,293,760