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 22:21vahookvahookScore: 3,125Success
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 22:212,88020,472,45601,152,0002,486,272
2Jun 4, 2025 22:212,89321,582,91301,157,0002,490,368
3Jun 4, 2025 22:213,04317,868,7671,217,00002,482,176
4Jun 4, 2025 22:213,10316,413,2481,241,00002,486,272
5Jun 4, 2025 22:213,12520,891,6461,250,00002,494,464
6Jun 4, 2025 22:213,14319,615,3371,257,00002,494,464
7Jun 4, 2025 22:213,23017,532,1591,292,00002,486,272
8Jun 4, 2025 22:213,25015,637,5601,300,00002,486,272
9Jun 4, 2025 22:213,48017,218,8171,392,00002,482,176