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 listJun 6, 2025 22:29zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 4, 2026 18:56Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 4, 2026 18:5709,574,2051,266,00002,121,728expected "2", got "50 "stderr
2Sep 4, 2026 18:57010,697,8231,245,00002,121,728expected "2", got "50 "stderr
3Sep 4, 2026 18:5709,607,72701,356,0002,121,728expected "2", got "50 "stderr
4Jun 6, 2025 22:293,87815,881,69401,551,0002,433,024
5Jun 6, 2025 22:293,98318,308,0951,593,00002,437,120
6Jun 6, 2025 22:293,99819,067,9031,599,00002,441,216