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 listJan 4, 2026 04:56Josu San MartinJosu San MartinError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 08:23C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 08:2308,957,840799,00002,117,632expected "10000", got "100 "
2Sep 7, 2026 08:2308,841,631801,00002,117,632expected "10000", got "100 "
3Sep 7, 2026 08:2309,110,196812,00002,117,632expected "10000", got "100 "
4Jan 4, 2026 04:523,61521,146,9871,446,00002,453,504
5Jan 4, 2026 05:414,06516,023,4191,626,00002,457,600
6Jan 4, 2026 05:414,25017,327,0881,700,00002,449,408
7Jan 4, 2026 04:444,28015,264,7171,712,00002,453,504
8Jan 4, 2026 04:444,29523,222,0731,718,00002,445,312
9Jan 4, 2026 04:444,30319,907,1321,721,00002,445,312
10Jan 4, 2026 04:444,31019,204,9921,724,00002,449,408
11Jan 4, 2026 04:524,32016,414,8651,728,00002,441,216
12Jan 4, 2026 04:564,32321,001,0371,729,00002,449,408
13Jan 4, 2026 04:444,35817,464,89001,743,0002,453,504
14Jan 4, 2026 04:444,38311,116,92501,753,0002,535,424
15Jan 4, 2026 04:444,39022,320,9041,756,00002,449,408
16Jan 4, 2026 05:414,42514,800,1801,770,00002,449,408
17Jan 4, 2026 04:444,58317,321,3051,833,00002,449,408
18Jan 4, 2026 04:564,79317,715,26101,917,0002,510,848
19Jan 4, 2026 04:524,79515,088,2111,918,00002,523,136
20Jan 4, 2026 04:444,80523,849,570961,000961,0002,445,312
21Jan 4, 2026 04:564,81019,147,211962,000962,0002,453,504