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 29, 2025 14:40vahookvahookError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 14:49C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 14:49016,083,0987,661,00002,113,536expected "10000", got "128 "
2Sep 7, 2026 14:49016,093,5337,553,00002,113,536expected "10000", got "128 "
3Sep 7, 2026 14:49015,850,4937,624,00002,113,536expected "10000", got "128 "
4May 29, 2025 14:4020,02521,036,0117,009,0001,001,0002,486,272
5May 29, 2025 14:4020,04824,091,9627,017,0001,002,0002,531,328
6May 29, 2025 14:4020,05326,693,1278,021,00002,531,328
7May 29, 2025 14:4020,08028,092,6307,028,0001,004,0002,469,888
8May 29, 2025 14:4120,08325,436,2477,029,0001,004,0002,478,080
9May 29, 2025 14:4120,08531,474,2707,030,0001,004,0002,269,184
10May 29, 2025 14:4120,09025,064,6427,032,0001,004,0002,478,080
11May 29, 2025 14:4120,10321,345,3967,036,0001,005,0002,531,328
12May 29, 2025 14:4120,11028,543,6107,039,0001,005,0002,482,176
13May 29, 2025 14:4020,12524,998,9787,044,0001,006,0002,269,184
14May 29, 2025 14:4020,14523,828,4277,051,0001,007,0002,478,080
15May 29, 2025 14:4020,16024,863,8357,056,0001,008,0002,273,280
16May 29, 2025 14:4120,17325,658,8607,061,0001,008,0002,531,328
17May 29, 2025 14:4020,18321,529,2587,064,0001,009,0002,531,328
18May 29, 2025 14:4120,20320,069,0587,071,0001,010,0002,482,176
19May 29, 2025 14:4020,23524,563,0847,083,0001,011,0002,486,272
20May 29, 2025 14:4120,30027,855,5797,105,0001,015,0002,482,176
21May 29, 2025 14:4120,33524,905,3357,118,0001,016,0002,531,328