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 02:10zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 14:59C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 14:59016,045,1266,605,0001,006,0002,121,728expected "10000", got "255 "stderr
2Sep 7, 2026 14:59016,146,3356,610,0001,017,0002,121,728expected "10000", got "255 "stderr
3Sep 7, 2026 14:59016,138,9937,616,00002,121,728expected "10000", got "255 "stderr
4May 29, 2025 02:1020,16024,278,0376,048,0002,016,0002,416,640
5May 29, 2025 02:1020,23021,787,5187,081,0001,011,0002,506,752
6May 29, 2025 02:1020,27321,667,5216,082,0002,027,0002,506,752
7May 29, 2025 02:1020,29025,660,3777,102,0001,014,0002,527,232
8May 29, 2025 02:1020,31327,762,3276,094,0002,031,0002,527,232
9May 29, 2025 02:1020,39525,328,5637,139,0001,019,0002,506,752
10May 29, 2025 02:1020,42823,825,6407,150,0001,021,0002,539,520
11May 29, 2025 02:1020,43025,618,3626,129,0002,043,0002,527,232
12May 29, 2025 02:1020,57023,098,6597,200,0001,028,0002,502,656