Largest Square Submatrix of all 1's NoSIMD_C#

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 4, 2025 23:10vahookvahookScore: 3,360Success
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 22:40Victor Mercklé10.00CustomSolution Held
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 4, 2025 22:532,86021,951,36001,144,0002,482,176
2Jun 4, 2025 23:102,96519,164,50001,186,0002,482,176
3Jun 4, 2025 23:102,98819,849,00401,195,0002,490,368
4Jun 4, 2025 22:533,09515,568,3951,238,00002,490,368
5Jun 4, 2025 22:563,21820,214,8591,287,00002,486,272
6Jun 4, 2025 22:563,26522,263,9931,306,00002,478,080
7Jun 4, 2025 22:563,34017,812,8021,336,00002,490,368
8Jun 4, 2025 22:563,36015,450,4181,344,00002,478,080
9Jun 4, 2025 23:103,39319,526,8461,357,00002,486,272
10Jun 4, 2025 22:533,43016,374,0531,372,00002,494,464
11Jun 4, 2025 22:563,47517,749,9561,390,00002,494,464
12Jun 4, 2025 22:563,49020,551,8791,396,00002,486,272
13Jun 4, 2025 23:103,50015,085,9171,400,00002,490,368
14Jun 4, 2025 23:103,82816,774,4291,531,00002,478,080
15Jun 4, 2025 23:103,83515,739,5671,534,00002,490,368