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 listMar 12, 2026 03:48olliecrowolliecrowScore: 3,953Success
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Apr 21, 2026 11:55Keefe50.95RecheckSolution Held
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 12, 2026 03:483,64014,678,4761,456,00002,490,368
2Mar 12, 2026 03:483,72520,050,4641,490,00002,494,464
3Mar 12, 2026 03:483,79016,311,8811,516,00002,498,560
4Mar 12, 2026 03:483,82020,578,9771,528,00002,494,464
5Mar 12, 2026 03:483,95317,486,7391,581,00002,494,464
6Mar 12, 2026 03:483,97324,793,2691,589,00002,498,560
7Mar 12, 2026 03:484,01818,421,1261,607,00002,494,464
8Mar 12, 2026 03:484,04815,042,6861,619,00002,494,464
9Mar 12, 2026 03:484,07317,245,5001,629,00002,498,560