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 30, 2025 17:27zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 14:54C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 14:54020,406,29010,784,0001,031,0002,121,728expected "10000", got "9984 "stderr
2Sep 7, 2026 14:54020,294,12710,855,0001,008,0002,121,728expected "10000", got "9984 "stderr
3Sep 7, 2026 14:54020,419,89110,833,0001,050,0002,121,728expected "10000", got "9984 "stderr
4May 30, 2025 17:3219,26022,657,3387,704,00002,420,736
5May 30, 2025 17:2719,34530,238,0467,738,00002,428,928
6May 30, 2025 17:3219,34822,710,2936,634,0001,105,0002,506,752
7May 30, 2025 17:2719,35026,125,6987,740,00002,527,232
8May 30, 2025 17:2719,36521,831,1857,746,00002,527,232
9May 30, 2025 17:3219,38325,391,4327,753,00002,420,736
10May 30, 2025 17:3219,39823,583,0987,759,00002,527,232
11May 30, 2025 17:3219,67323,492,6856,886,000983,0002,527,232
12May 30, 2025 17:3219,69524,889,7047,878,00002,416,640
13May 30, 2025 17:2719,72022,558,5535,916,0001,972,0002,527,232
14May 30, 2025 17:2719,72327,935,7775,917,0001,972,0002,527,232
15May 30, 2025 17:2719,75023,349,6125,925,0001,975,0002,527,232
16May 30, 2025 17:3219,75028,604,0087,900,00002,416,640
17May 30, 2025 17:2719,75322,396,3245,926,0001,975,0002,420,736
18May 30, 2025 17:2719,75521,126,7835,927,0001,975,0002,527,232
19May 30, 2025 17:2719,75828,555,2127,903,00002,527,232
20May 30, 2025 17:3219,78029,504,5277,912,00002,527,232
21May 30, 2025 17:3219,78822,688,9147,915,00002,527,232