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 1, 2025 15:34vahookvahookError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 4, 2026 18:26Victor Mercklé11.56CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 4, 2026 18:2709,063,6061,084,00002,113,536expected "2", got "50 "
2Sep 4, 2026 18:2709,132,7401,085,00002,113,536expected "2", got "50 "
3Sep 4, 2026 18:2709,130,0241,083,00002,113,536expected "2", got "50 "
4Jun 1, 2025 15:343,61816,779,9771,447,00002,494,464
5Jun 1, 2025 15:343,66018,645,0471,464,00002,486,272
6Jun 1, 2025 15:343,67821,338,0561,471,00002,486,272
7Jun 1, 2025 15:343,69517,448,5371,478,00002,490,368
8Jun 1, 2025 15:343,71823,748,3151,487,00002,486,272
9Jun 1, 2025 15:343,72318,895,3261,489,00002,490,368
10Jun 1, 2025 15:343,94526,949,7771,578,00002,486,272
11Jun 1, 2025 15:343,99519,629,0291,598,00002,478,080
12Jun 1, 2025 15:344,14022,382,8991,656,00002,531,328