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

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 11:07C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 11:07022,845,06611,630,0001,033,0002,113,536expected "300", got "153"
2Sep 5, 2026 11:07022,702,07411,616,0001,022,0002,113,536expected "300", got "153"
3Sep 5, 2026 11:07022,819,80211,653,0001,024,0002,113,536expected "300", got "153"
4May 9, 2026 17:0926,66525,600,1709,594,0001,072,0002,367,488
5May 9, 2026 17:0928,65228,733,32410,331,0001,130,0002,359,296
6May 9, 2026 17:0928,78729,018,19110,466,0001,049,0002,367,488
7May 9, 2026 17:0928,79725,538,94210,471,0001,048,0002,363,392
8May 9, 2026 17:0928,85024,977,49710,491,0001,049,0002,363,392
9May 9, 2026 17:0928,99029,687,76510,542,0001,054,0002,351,104
10May 9, 2026 17:0929,15726,314,59710,593,0001,070,0002,355,200
11May 9, 2026 17:0929,22029,009,81710,598,0001,090,0002,359,296
12May 9, 2026 17:0929,40530,063,23910,626,0001,136,0002,363,392