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 21:30vahookvahookError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
May 17, 2026 13:43M-Rochat57.52CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 17, 2026 14:01010,830,984798,00002,113,536expected "497", got "128 "
2May 17, 2026 14:0108,511,708787,00002,113,536expected "497", got "128 "
3May 17, 2026 14:0109,175,595801,00002,113,536expected "497", got "128 "
4Jun 4, 2025 21:302,94016,669,67901,176,0002,490,368
5Jun 4, 2025 21:302,95318,971,85301,181,0002,531,328
6Jun 4, 2025 21:303,01016,539,89101,204,0002,490,368
7Jun 4, 2025 21:303,03821,671,78801,215,0002,486,272
8Jun 4, 2025 21:303,06317,130,2341,225,00002,494,464
9Jun 4, 2025 21:303,06816,960,49301,227,0002,531,328
10Jun 4, 2025 21:303,12319,778,1491,249,00002,482,176
11Jun 4, 2025 21:303,15513,038,3261,262,00002,494,464
12Jun 4, 2025 21:303,28516,392,4781,314,00002,490,368