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 5, 2025 01:03zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 22:28Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 22:2908,727,5091,061,00002,113,536expected "51", got "50 "
2Jul 5, 2026 22:2908,700,5121,003,00002,113,536expected "51", got "50 "
3Jul 5, 2026 22:2908,707,6691,005,00002,113,536expected "51", got "50 "
4Jun 5, 2025 01:032,92817,442,5521,171,00002,486,272
5Jun 5, 2025 01:033,01318,244,1961,205,00002,494,464
6Jun 5, 2025 01:033,02317,135,3741,209,00002,494,464
7Jun 5, 2025 01:033,11818,916,9901,247,00002,486,272
8Jun 5, 2025 01:033,19814,436,5671,279,00002,494,464
9Jun 5, 2025 01:033,21016,990,4511,284,00002,490,368
10Jun 5, 2025 01:033,23314,317,0461,293,00002,494,464
11Jun 5, 2025 01:033,23822,561,8461,295,00002,494,464
12Jun 5, 2025 01:033,25021,981,0221,300,00002,494,464