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 listSep 2, 2026 03:17mgildermgilderScore: 98,910Success
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 08:25C#_user10.00CustomSolution Held
Sep 5, 2026 10:51C#_user10.00CustomSolution Held
Sep 5, 2026 09:08C#_user10.00CustomSolution Held
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 2, 2026 03:1897,14548,699,58432,317,0006,541,0002,117,632
2Sep 2, 2026 03:1897,41050,255,78831,459,0007,505,0002,117,632
3Sep 2, 2026 03:1897,72748,969,63031,708,0007,383,0002,117,632
4Sep 2, 2026 03:1898,27049,269,14331,680,0007,628,0002,117,632
5Sep 2, 2026 03:1898,91049,512,83832,004,0007,560,0002,117,632
6Sep 2, 2026 03:18106,93752,688,29936,317,0006,458,0002,117,632
7Sep 2, 2026 03:18107,22052,919,24235,190,0007,698,0002,117,632
8Sep 2, 2026 03:18107,39252,922,01735,314,0007,643,0002,117,632
9Sep 2, 2026 03:18108,10553,118,16736,523,0006,719,0002,117,632