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:39zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 11:10C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 11:10010,393,6491,069,0001,045,0002,121,728expected "300", got "537 "stderr
2Sep 5, 2026 11:10010,445,1021,063,0001,034,0002,121,728expected "300", got "537 "stderr
3Sep 5, 2026 11:10010,558,0542,119,00002,121,728expected "300", got "537 "stderr
4May 31, 2025 21:434,05015,573,99901,620,0002,420,736
5May 31, 2025 21:434,17022,794,8901,668,00002,424,832
6May 31, 2025 21:434,20517,735,87401,682,0002,428,928
7May 31, 2025 21:434,79320,699,8081,917,00002,424,832
8May 31, 2025 21:394,79522,587,110959,000959,0002,420,736
9May 31, 2025 21:434,79522,181,22201,918,0002,412,544
10May 31, 2025 21:434,79520,042,58801,918,0002,412,544
11May 31, 2025 21:434,80515,466,7051,922,00002,412,544
12May 31, 2025 21:434,82015,248,05801,928,0002,416,640
13May 31, 2025 21:394,82817,571,4861,931,00002,424,832
14May 31, 2025 21:434,84822,916,15701,939,0002,412,544
15May 31, 2025 21:395,00516,466,3591,001,0001,001,0002,506,752