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 4, 2025 01:08zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 4, 2026 18:06Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 4, 2026 18:0609,221,965969,00002,113,536expected "2", got "50 "
2Sep 4, 2026 18:0609,167,587966,00002,113,536expected "2", got "50 "
3Sep 4, 2026 18:0609,085,353980,00002,113,536expected "2", got "50 "
4Jun 4, 2025 01:083,05522,600,2571,222,00002,478,080
5Jun 4, 2025 00:413,11314,302,7531,245,00002,486,272
6Jun 4, 2025 00:413,18319,023,5701,273,00002,482,176
7Jun 4, 2025 00:413,18822,902,80401,275,0002,498,560
8Jun 4, 2025 00:413,21018,173,9871,284,00002,490,368
9Jun 4, 2025 00:413,32821,357,7511,331,00002,486,272
10Jun 4, 2025 00:413,39017,777,6951,356,00002,482,176
11Jun 4, 2025 01:083,65816,895,5151,463,00002,482,176
12Jun 4, 2025 00:413,66318,425,5851,465,00002,490,368
13Jun 4, 2025 00:413,67817,670,4721,471,00002,486,272
14Jun 4, 2025 01:083,74516,760,1561,498,00002,482,176
15Jun 4, 2025 00:413,77518,424,5881,510,00002,486,272