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 listAug 17, 2026 22:50Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 00:47Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 02:2809,886,6691,537,0000106,496expected "2", got "50 "stderr
2Aug 17, 2026 22:573,0509,704,2961,220,000053,248stderr
3Aug 17, 2026 22:573,3359,479,6921,334,000069,632stderr
4Aug 17, 2026 22:573,4029,487,4211,361,000090,112stderr
5Aug 17, 2026 22:573,5179,690,7401,407,000069,632stderr
6Aug 17, 2026 22:573,7009,690,2351,480,0000106,496stderr
7Aug 17, 2026 22:573,7379,698,3491,495,000073,728stderr
8Sep 5, 2026 02:283,7709,610,7241,508,0000106,496stderr
9Aug 17, 2026 22:573,8159,543,2661,526,0000106,496stderr
10Aug 17, 2026 22:573,9409,608,0841,576,0000106,496stderr
11Aug 17, 2026 22:574,34210,519,0311,737,0000106,496stderr
12Sep 5, 2026 02:284,3759,952,9341,750,0000106,496stderr