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 08:38Victor MerckléVictor MerckléError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 01:41Tomislav Tunkovic10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 03:29013,336,8582,499,0001,196,0002,142,208expected "1339", got "255 "
2Sep 5, 2026 03:29012,037,8022,631,0001,071,0002,142,208expected "1323", got "255 "
3Sep 5, 2026 03:29011,930,2551,697,0001,579,0002,142,208expected "1061", got "255 "
4Jun 11, 2026 08:404,10211,025,02601,641,0002,195,456
5Jun 11, 2026 08:404,47211,144,94301,789,0002,195,456
6Jun 11, 2026 08:404,92510,938,70401,970,0002,195,456
7Jun 11, 2026 08:405,0309,392,73302,012,0002,166,784
8Jun 11, 2026 08:405,13510,874,26602,054,0002,166,784
9Jun 11, 2026 08:405,27511,772,29302,110,0002,195,456
10Jun 11, 2026 08:406,2759,877,8041,325,0001,185,0002,195,456
11Jun 11, 2026 08:406,4929,976,3701,416,0001,181,0002,195,456
12Jun 11, 2026 08:406,53011,849,8291,486,0001,126,0002,195,456