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 31, 2025 21:45zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 14:40C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 14:4009,820,0441,423,00002,121,728expected "10000", got "32 "stderr
2Sep 7, 2026 14:4009,786,2901,416,00002,121,728expected "10000", got "32 "stderr
3Sep 7, 2026 14:4009,793,1141,416,00002,121,728expected "10000", got "32 "stderr
4May 31, 2025 01:064,09314,407,28401,637,0002,506,752
5May 31, 2025 01:064,24321,367,9621,697,00002,424,832
6May 31, 2025 01:064,26818,536,22701,707,0002,424,832
7May 31, 2025 01:064,39319,795,3531,757,00002,416,640
8May 31, 2025 01:064,49816,895,3781,799,00002,420,736
9May 31, 2025 21:454,79519,814,088959,000959,0002,416,640
10May 31, 2025 01:064,81816,803,35901,927,0002,420,736
11May 31, 2025 01:064,83521,736,050967,000967,0002,428,928
12May 31, 2025 01:064,85519,357,062971,000971,0002,420,736
13May 31, 2025 01:064,85819,207,86001,943,0002,424,832
14May 31, 2025 21:454,90821,330,49201,963,0002,412,544
15May 31, 2025 21:455,25822,434,28602,103,0002,420,736