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 6, 2025 23:46zielajzielajScore: 3,248Success
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Jul 5, 2026 22:35Victor Mercklé10.00CustomSolution Held
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 6, 2025 23:472,96515,814,0151,186,00002,490,368
2Jun 6, 2025 23:462,98321,520,76201,193,0002,490,368
3Jun 6, 2025 23:463,02519,532,71801,210,0002,490,368
4Jun 6, 2025 23:483,12018,181,9461,248,00002,527,232
5Jun 6, 2025 23:483,24319,565,5081,297,00002,527,232
6Jun 6, 2025 23:473,24821,668,2081,299,00002,490,368
7Jun 6, 2025 23:483,24813,628,0411,299,00002,486,272
8Jun 6, 2025 23:473,26318,234,0301,305,00002,490,368
9Jun 6, 2025 23:463,34319,746,9151,337,00002,490,368
10Jun 6, 2025 23:4639,72341,964,00214,896,000993,0002,490,368
11Jun 6, 2025 23:4639,75532,555,83714,909,000993,0002,486,272
12Jun 6, 2025 23:4640,15043,391,15815,057,0001,003,0002,498,560