Largest Square Submatrix of all 1's C#_user

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 4, 2025 22:21vahookvahookError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Jul 3, 2026 09:26Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 3, 2026 09:2708,508,422938,00002,113,536expected "51", got "50 "
2Jul 3, 2026 09:2708,454,452954,00002,113,536expected "51", got "50 "
3Jul 3, 2026 09:2708,583,502923,00002,113,536expected "51", got "50 "
4Jun 4, 2025 22:212,88020,472,45601,152,0002,486,272
5Jun 4, 2025 22:212,89321,582,91301,157,0002,490,368
6Jun 4, 2025 22:213,04317,868,7671,217,00002,482,176
7Jun 4, 2025 22:213,10316,413,2481,241,00002,486,272
8Jun 4, 2025 22:213,12520,891,6461,250,00002,494,464
9Jun 4, 2025 22:213,14319,615,3371,257,00002,494,464
10Jun 4, 2025 22:213,23017,532,1591,292,00002,486,272
11Jun 4, 2025 22:213,25015,637,5601,300,00002,486,272
12Jun 4, 2025 22:213,48017,218,8171,392,00002,482,176