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 16, 2026 04:17Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 02:10Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 03:4909,862,70701,702,0002,113,536expected "7", got "50 "
2Sep 5, 2026 03:4909,897,26401,589,0002,113,536expected "2", got "50 "
3Sep 5, 2026 03:4909,723,42801,623,0002,113,536expected "2", got "50 "
4Jun 16, 2026 04:182,0328,258,082813,00002,113,536
5Jun 16, 2026 04:182,3208,633,527928,00002,113,536
6Jun 16, 2026 04:182,4078,663,054963,00002,113,536
7Jun 16, 2026 04:182,4858,404,662994,00002,113,536
8Jun 16, 2026 04:182,5008,655,6451,000,00002,113,536
9Jun 16, 2026 04:182,7028,492,5251,081,00002,113,536
10Jun 16, 2026 04:183,0108,626,1071,204,00002,113,536
11Jun 16, 2026 04:187,56710,702,5493,027,00002,113,536
12Jun 16, 2026 04:188,20510,565,9263,282,00002,113,536