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 listApr 27, 2026 19:42Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 06:29Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 06:47012,111,77802,146,0002,121,728expected "2", got "50 "
2Sep 5, 2026 06:47011,918,89402,124,0002,121,728expected "2", got "50 "
3Sep 5, 2026 06:47011,953,18302,122,0002,121,728expected "2", got "50 "
4Apr 27, 2026 19:436,06017,492,3571,212,0001,212,0002,514,944
5Apr 27, 2026 19:436,10525,423,6001,221,0001,221,0002,510,848
6Apr 27, 2026 19:436,11518,736,4831,223,0001,223,0002,510,848
7Apr 27, 2026 19:436,12519,207,3341,225,0001,225,0002,523,136
8Apr 27, 2026 19:436,43521,820,7641,287,0001,287,0002,514,944
9Apr 27, 2026 19:438,08019,814,6292,155,0001,077,0002,514,944
10Apr 27, 2026 19:438,09517,476,3501,079,0002,159,0002,519,040
11Apr 27, 2026 19:438,27523,434,7832,207,0001,103,0002,519,040
12Apr 27, 2026 19:438,44720,563,9602,253,0001,126,0002,523,136