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 8, 2026 19:28Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 4, 2026 20:09Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 4, 2026 20:09010,217,1732,167,00002,113,536expected "1050", got "255 "
2Sep 4, 2026 20:09010,605,2622,466,00002,113,536expected "1263", got "255 "
3Sep 4, 2026 20:09010,881,0512,750,00002,113,536expected "1439", got "255 "
4Jun 8, 2026 19:292,1958,377,020878,00002,113,536
5Jun 8, 2026 19:292,2128,365,002885,00002,113,536
6Jun 8, 2026 19:292,2628,306,492905,00002,113,536
7Jun 8, 2026 19:292,4328,498,782973,00002,113,536
8Jun 8, 2026 19:292,4428,440,331977,00002,113,536
9Jun 8, 2026 19:292,4758,504,300990,00002,113,536
10Jun 8, 2026 19:292,4909,430,829996,00002,113,536
11Jun 8, 2026 19:292,5408,456,3581,016,00002,113,536
12Jun 8, 2026 19:292,5958,772,4211,038,00002,113,536