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 listApr 24, 2026 11:06limanjun99limanjun99Error
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 09:59C#_user14.51CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 09:59020,413,1638,436,0001,070,0002,113,536expected "640", got "611"
2Sep 5, 2026 09:59019,620,5918,486,0001,055,0002,117,632expected "665", got "382"
3Sep 5, 2026 09:59019,673,9898,230,0001,152,0002,117,632expected "675", got "382"
4Apr 24, 2026 11:0724,86229,928,9237,956,0001,989,0002,519,040
5Apr 24, 2026 11:0724,88232,118,6987,963,0001,990,0002,519,040
6Apr 24, 2026 11:0725,07528,715,1778,024,0002,006,0002,342,912
7Apr 24, 2026 11:0725,10023,412,1898,032,0002,008,0002,527,232
8Apr 24, 2026 11:0725,10531,257,3328,034,0002,008,0002,510,848
9Apr 24, 2026 11:0725,10724,473,2308,035,0002,008,0002,523,136
10Apr 24, 2026 11:0725,14224,578,5029,052,0001,005,0002,523,136
11Apr 24, 2026 11:0725,14228,870,0668,046,0002,011,0002,519,040
12Apr 24, 2026 11:0725,15526,251,0178,050,0002,012,0002,342,912