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 27, 2025 02:57zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 15:09C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 15:09017,809,5678,274,0001,015,0002,121,728expected "10000", got "128 "stderr
2Sep 7, 2026 15:09017,639,5179,276,00002,121,728expected "10000", got "128 "stderr
3Sep 7, 2026 15:09017,532,3738,287,0001,018,0002,121,728expected "10000", got "128 "stderr
4May 27, 2025 02:5724,94026,187,3008,979,000997,0002,527,232
5May 27, 2025 02:5724,98527,212,8748,995,000999,0002,420,736
6May 27, 2025 02:5725,01528,569,6389,006,0001,000,0002,527,232
7May 27, 2025 02:5725,06024,050,4109,022,0001,002,0002,416,640
8May 27, 2025 02:5725,07524,156,0829,027,0001,003,0002,527,232
9May 27, 2025 02:5725,07826,063,2389,028,0001,003,0002,527,232
10May 27, 2025 02:5725,11326,344,5939,041,0001,004,0002,424,832
11May 27, 2025 02:5725,11527,187,1149,042,0001,004,0002,416,640
12May 27, 2025 02:5725,23325,489,1109,084,0001,009,0002,527,232