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 19:30Aleksei ShahoikaAleksei ShahoikaError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 10:55C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 10:57022,319,11010,940,0001,261,0002,113,536expected "300", got "153"
2Sep 5, 2026 10:57022,276,71111,023,0001,088,0002,113,536expected "300", got "153"
3Sep 5, 2026 10:57022,138,24910,972,0001,084,0002,113,536expected "300", got "153"
4May 9, 2026 19:3121,15023,359,8637,379,0001,081,0002,367,488
5May 9, 2026 19:3122,41226,110,2197,894,0001,071,0002,367,488
6May 9, 2026 19:3122,66523,864,4477,940,0001,126,0002,367,488
7May 9, 2026 19:3124,04726,771,3308,492,0001,127,0002,359,296
8May 9, 2026 19:3124,20524,822,4398,604,0001,078,0002,355,200
9May 9, 2026 19:3124,37228,123,0638,578,0001,171,0002,363,392
10May 9, 2026 19:3124,44525,460,5328,607,0001,171,0002,359,296
11May 9, 2026 19:3124,50029,021,5068,637,0001,163,0002,359,296
12May 9, 2026 19:3124,61525,808,6578,766,0001,080,0002,359,296