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 24, 2026 01:59Andrew EpsteinAndrew EpsteinScore: 4,492Success
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 08:23C#_user14.80CustomSolution Held
Sep 5, 2026 10:50C#_user14.80CustomSolution Held
Sep 5, 2026 09:06C#_user14.80CustomSolution Held
Sep 4, 2026 14:21Tomislav Tunkovic14.80CustomSolution Held
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 24, 2026 02:004,39711,533,5901,759,00002,117,632
2Aug 24, 2026 02:004,41511,236,1061,766,00002,117,632
3Aug 24, 2026 02:004,46211,223,1061,785,00002,117,632
4Aug 24, 2026 02:004,48512,454,2841,794,00002,117,632
5Aug 24, 2026 02:004,49211,301,0911,797,00002,117,632
6Aug 24, 2026 02:004,51011,372,0051,804,00002,117,632
7Aug 24, 2026 02:004,51711,317,3931,807,00002,117,632
8Aug 24, 2026 02:004,63211,390,9361,853,00002,117,632
9Aug 24, 2026 02:004,74511,344,37001,898,0002,117,632