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:40olliecrowolliecrowError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 05:43Tomislav Tunkovic50.16CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 06:0909,200,322928,00002,117,632expected "2", got "50"
2Mar 12, 2026 03:404,76517,341,6741,906,00002,490,368
3Mar 12, 2026 03:404,81019,830,137962,000962,0002,502,656
4Mar 12, 2026 03:404,85516,308,306971,000971,0002,498,560
5Mar 12, 2026 03:404,89523,176,700979,000979,0002,494,464
6Mar 12, 2026 03:404,95022,492,4151,980,00002,498,560
7Mar 12, 2026 03:405,28016,855,3881,056,0001,056,0002,486,272
8Mar 12, 2026 03:405,90019,047,4202,360,00002,490,368
9Sep 5, 2026 06:096,14210,830,8152,457,00002,117,632
10Mar 12, 2026 03:406,38517,637,9551,277,0001,277,0002,498,560
11Mar 12, 2026 03:407,27522,443,6772,910,00002,498,560
12Sep 5, 2026 06:0910,13512,355,4224,054,00002,117,632