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 listMay 9, 2026 18:11Aleksei ShahoikaAleksei ShahoikaError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 08:24C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 08:25018,478,8987,213,0001,102,0002,121,728expected "10000", got "255"
2Sep 7, 2026 08:25018,362,2997,172,0001,034,0002,121,728expected "10000", got "255"
3Sep 7, 2026 08:25018,241,4217,128,0001,035,0002,121,728expected "10000", got "255"
4May 9, 2026 18:1227,30732,308,7279,853,0001,070,0002,359,296
5May 9, 2026 18:1228,56226,997,78710,353,0001,072,0002,363,392
6May 9, 2026 18:1230,86226,240,33011,290,0001,055,0002,367,488
7May 9, 2026 18:1233,25231,815,08412,228,0001,073,0002,363,392
8May 9, 2026 18:1233,50027,548,77912,352,0001,048,0002,359,296
9May 9, 2026 18:1233,94028,380,55212,523,0001,053,0002,351,104
10May 9, 2026 18:1234,18529,283,10412,603,0001,071,0002,363,392
11May 9, 2026 18:1234,26731,040,50812,637,0001,070,0002,359,296
12May 9, 2026 18:1235,02229,692,12412,962,0001,047,0002,375,680