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 3, 2025 23:53zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 4, 2026 18:31Victor Mercklé22.43CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 4, 2026 18:3109,576,5631,357,00002,117,632expected "2", got "50 "
2Sep 4, 2026 18:3109,556,0681,281,00002,117,632expected "2", got "50 "
3Sep 4, 2026 18:3109,593,3611,370,00002,117,632expected "2", got "50 "
4Jun 3, 2025 23:533,55519,984,73101,422,0002,420,736
5Jun 3, 2025 23:533,64815,581,00601,459,0002,428,928
6Jun 3, 2025 23:533,67322,147,4421,469,00002,424,832
7Jun 3, 2025 23:533,68816,119,5831,475,00002,433,024
8Jun 3, 2025 23:533,83018,331,91201,532,0002,506,752
9Jun 3, 2025 23:533,86314,769,1351,545,00002,506,752
10Jun 3, 2025 23:534,06818,341,4001,627,00002,412,544
11Jun 3, 2025 23:534,09320,948,2271,637,00002,420,736
12Jun 3, 2025 23:534,11516,108,2651,646,00002,412,544