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 listJun 11, 2026 07:47Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 02:02Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 03:39013,607,0952,682,0001,292,0002,179,072expected "1421", got "255 "
2Sep 5, 2026 03:39011,857,77502,247,0002,179,072expected "2", got "50 "
3Sep 5, 2026 03:39013,271,1071,866,0001,500,0002,138,112expected "1016", got "255 "
4Jun 11, 2026 07:515,50510,864,27702,202,0002,179,072
5Jun 11, 2026 07:515,65010,957,74202,260,0002,179,072
6Jun 11, 2026 07:515,82710,941,98602,331,0002,179,072
7Jun 11, 2026 07:515,96011,159,70902,384,0002,179,072
8Jun 11, 2026 07:516,12511,505,00702,450,0002,179,072
9Jun 11, 2026 07:516,15211,146,10302,461,0002,179,072
10Jun 11, 2026 07:516,17211,099,3071,090,0001,379,0002,179,072
11Jun 11, 2026 07:516,17511,164,00802,470,0002,179,072
12Jun 11, 2026 07:516,18211,164,72402,473,0002,179,072