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 23:11vahookvahookError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 22:39Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 22:3908,401,152952,00002,113,536expected "51", got "50 "
2Jul 5, 2026 22:392,0708,438,647828,00002,113,536
3Jul 5, 2026 22:392,2658,341,096906,00002,113,536
4Jun 4, 2025 23:123,19015,761,8041,276,00002,486,272
5Jun 4, 2025 23:123,27522,706,0581,310,00002,482,176
6Jun 4, 2025 23:113,27820,019,2811,311,00002,486,272
7Jun 4, 2025 23:123,30515,596,9021,322,00002,490,368
8Jun 4, 2025 23:113,31816,357,95401,327,0002,531,328
9Jun 4, 2025 23:113,32019,884,6781,328,00002,490,368