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 27, 2026 21:23Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 4, 2026 19:32Tomislav Tunkovic33.10CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 4, 2026 19:38017,131,5466,392,0001,009,0002,117,632expected "1484", got "255 "
2Sep 4, 2026 19:38011,429,72101,802,0002,117,632expected "7", got "50 "
3Sep 4, 2026 19:38011,413,32801,834,0002,117,632expected "5", got "50 "
4Apr 27, 2026 21:244,22017,657,3131,688,00002,347,008
5Apr 27, 2026 21:244,47721,459,3011,791,00002,355,200
6Apr 27, 2026 21:244,71018,047,105942,000942,0002,347,008
7Apr 27, 2026 21:245,10517,960,79602,042,0002,347,008
8Apr 27, 2026 21:245,30520,621,8531,061,0001,061,0002,428,928
9Apr 27, 2026 21:245,63017,318,8411,126,0001,126,0002,433,024
10Apr 27, 2026 21:245,79022,106,4041,158,0001,158,0002,351,104
11Apr 27, 2026 21:245,84516,780,24202,338,0002,355,200
12Apr 27, 2026 21:246,01718,415,2842,407,00002,363,392