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 5, 2025 01:25zielajzielajScore: 3,145Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 5, 2025 01:252,86015,057,93201,144,0002,490,368
2Jun 5, 2025 01:252,97519,391,20601,190,0002,490,368
3Jun 5, 2025 01:253,11318,591,0491,245,00002,490,368
4Jun 5, 2025 01:253,13019,482,8671,252,00002,490,368
5Jun 5, 2025 01:253,14514,291,7511,258,00002,490,368
6Jun 5, 2025 01:253,17019,649,4651,268,00002,494,464
7Jun 5, 2025 01:253,19017,527,7821,276,00002,494,464
8Jun 5, 2025 01:253,20315,623,5901,281,00002,482,176
9Jun 5, 2025 01:253,32321,945,6021,329,00002,482,176