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 5, 2025 01:38zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 22:31Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 22:3108,627,939996,00002,113,536expected "51", got "50 "
2Jul 5, 2026 22:3108,699,016943,00002,113,536expected "51", got "50 "
3Jul 5, 2026 22:3109,697,781923,00002,113,536expected "51", got "50 "
4Jun 5, 2025 01:382,78314,922,91501,113,0002,490,368
5Jun 5, 2025 01:382,93814,231,15801,175,0002,490,368
6Jun 5, 2025 01:383,07820,797,4491,231,00002,486,272
7Jun 5, 2025 01:383,17515,372,8691,270,00002,494,464
8Jun 5, 2025 01:383,21818,883,5041,287,00002,490,368
9Jun 5, 2025 01:383,24816,681,0201,299,00002,527,232
10Jun 5, 2025 01:383,26814,252,8041,307,00002,527,232
11Jun 5, 2025 01:383,27018,971,1661,308,00002,490,368
12Jun 5, 2025 01:383,28819,699,7511,315,00002,494,464