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 listSep 4, 2026 07:18Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 08:52C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 08:52017,774,8368,601,000024,576expected "677", got "383 "stderr
2Sep 5, 2026 08:52017,682,4218,550,000024,576expected "691", got "326 "stderr
3Sep 5, 2026 08:52017,460,7828,519,000024,576expected "667", got "383 "stderr
4Sep 4, 2026 07:221,4509,355,918580,000024,576stderr
5Sep 4, 2026 07:221,5328,428,797613,000024,576stderr
6Sep 4, 2026 07:221,5379,405,140615,000024,576stderr
7Sep 4, 2026 07:221,6029,409,192641,000024,576stderr
8Sep 4, 2026 07:221,8758,845,717750,000024,576stderr
9Sep 4, 2026 07:221,9958,789,234798,000024,576stderr
10Sep 4, 2026 07:222,0009,533,999800,000024,576stderr
11Sep 4, 2026 07:222,0079,591,205803,000024,576stderr
12Sep 4, 2026 07:222,0609,146,567824,000024,576stderr