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

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 05:45Tomislav Tunkovic48.10CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 06:10011,224,6821,454,00002,121,728expected "2", got "50"
2Sep 5, 2026 06:10011,090,9431,427,00002,121,728expected "2", got "50"
3Sep 5, 2026 06:104,62711,628,8201,851,00002,121,728
4Mar 23, 2026 01:234,80318,529,5591,921,00002,363,392
5Mar 23, 2026 01:235,35517,823,0981,071,0001,071,0002,449,408
6Mar 12, 2026 03:266,88522,779,3221,377,0001,377,0002,367,488
7Mar 12, 2026 03:266,99023,380,0662,796,00002,359,296
8Mar 12, 2026 03:267,33019,152,3921,955,000977,0002,375,680
9Mar 12, 2026 03:267,34522,798,316979,0001,959,0002,363,392
10Mar 12, 2026 03:267,35021,115,425980,0001,960,0002,277,376
11Mar 12, 2026 03:267,56819,533,8182,018,0001,009,0002,359,296
12Mar 12, 2026 03:269,18521,531,8833,674,00002,363,392
13Mar 12, 2026 03:269,91326,734,9182,974,000991,0002,285,568
14Mar 23, 2026 01:2310,27324,887,2323,082,0001,027,0002,293,760
15Mar 12, 2026 03:2610,93024,355,3193,279,0001,093,0002,285,568