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 27, 2025 13:19vahookvahookError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 15:00C#_user18.46CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 15:00025,354,35916,984,00002,113,536expected "10000", got "255 "
2Sep 7, 2026 15:00025,280,13416,977,00002,113,536expected "10000", got "255 "
3Sep 7, 2026 15:00025,251,32917,004,00002,113,536expected "10000", got "255 "
4May 27, 2025 13:1943,42344,216,25817,369,00002,273,280
5May 27, 2025 13:1943,43540,133,73117,374,00002,273,280
6May 27, 2025 13:1943,49029,875,48917,396,00002,482,176
7May 27, 2025 13:1943,49532,029,95617,398,00002,490,368
8May 27, 2025 13:1943,52040,764,47117,408,00002,531,328
9May 27, 2025 13:1943,52337,852,63717,409,00002,482,176
10May 27, 2025 13:1943,53542,602,20717,414,00002,473,984
11May 27, 2025 13:1943,53529,342,87017,414,00002,482,176
12May 27, 2025 13:1943,55550,092,74817,422,00002,273,280