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

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 14:51C#_user22.61CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 14:51010,962,9321,341,0001,341,0002,121,728expected "10000", got "32 "stderr
2Sep 7, 2026 14:51011,003,4511,345,0001,345,0002,121,728expected "10000", got "32 "stderr
3Sep 7, 2026 14:51010,987,8541,346,0001,346,0002,121,728expected "10000", got "32 "stderr
4May 31, 2025 00:365,17522,506,5071,035,0001,035,0002,424,832
5May 31, 2025 00:366,73522,400,7141,347,0001,347,0002,428,928
6May 31, 2025 00:367,30515,461,338974,0001,948,0002,531,328