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 listMar 12, 2026 03:15olliecrowolliecrowError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 06:00Tomislav Tunkovic36.78CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 06:24015,373,1793,022,0001,012,0002,121,728expected "6", got "50"
2Sep 5, 2026 06:247,36212,786,8331,936,0001,009,0002,121,728
3Sep 5, 2026 06:247,70212,970,1343,081,00002,121,728
4Mar 12, 2026 03:1511,08522,725,3143,326,0001,108,0002,473,984
5Mar 12, 2026 03:1511,17820,111,7584,471,00002,285,568
6Mar 12, 2026 03:1511,19821,975,2624,479,00002,371,584
7Mar 12, 2026 03:1511,36321,279,5723,409,0001,136,0002,473,984
8Mar 12, 2026 03:1511,37021,314,5643,411,0001,137,0002,355,200
9Mar 12, 2026 03:1511,37324,562,2174,549,00002,285,568
10Mar 12, 2026 03:1511,38020,711,1403,414,0001,138,0002,285,568
11Mar 12, 2026 03:1511,42819,962,8644,571,00002,285,568
12Mar 12, 2026 03:1511,45527,398,5533,437,0001,145,0002,285,568