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:30vahookvahookScore: 3,063Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 4, 2025 21:302,94016,669,67901,176,0002,490,368
2Jun 4, 2025 21:302,95318,971,85301,181,0002,531,328
3Jun 4, 2025 21:303,01016,539,89101,204,0002,490,368
4Jun 4, 2025 21:303,03821,671,78801,215,0002,486,272
5Jun 4, 2025 21:303,06317,130,2341,225,00002,494,464
6Jun 4, 2025 21:303,06816,960,49301,227,0002,531,328
7Jun 4, 2025 21:303,12319,778,1491,249,00002,482,176
8Jun 4, 2025 21:303,15513,038,3261,262,00002,494,464
9Jun 4, 2025 21:303,28516,392,4781,314,00002,490,368