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 17:38Aleksei ShahoikaAleksei ShahoikaError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 10:50C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 10:50020,513,5329,619,0001,026,0002,117,632expected "300", got "153"
2Sep 5, 2026 10:50020,881,4069,998,0001,035,0002,113,536expected "300", got "153"
3Sep 5, 2026 10:50020,689,0449,675,0001,122,0002,113,536expected "300", got "153"
4May 9, 2026 17:4022,39027,624,1237,890,0001,066,0002,355,200
5May 9, 2026 17:4023,04226,183,2098,144,0001,073,0002,363,392
6May 9, 2026 17:4023,29727,458,4098,249,0001,070,0002,375,680
7May 9, 2026 17:4023,70727,208,3928,421,0001,062,0002,367,488
8May 9, 2026 17:4023,74523,857,2458,419,0001,079,0002,367,488
9May 9, 2026 17:4023,83227,277,5268,452,0001,081,0002,355,200
10May 9, 2026 17:4023,92026,178,8948,509,0001,059,0002,367,488
11May 9, 2026 17:4024,15228,436,9668,562,0001,099,0002,359,296
12May 9, 2026 17:4024,25224,364,4358,639,0001,062,0002,367,488