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 listApr 26, 2026 21:11TudyMTudyMScore: 171,720Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 26, 2026 21:12169,21783,671,31861,626,0006,061,0002,519,040
2Apr 26, 2026 21:12169,42587,534,71761,791,0005,979,0002,514,944
3Apr 26, 2026 21:12169,96587,514,89064,987,0002,999,0002,510,848
4Apr 26, 2026 21:12171,13787,234,76963,422,0005,033,0002,519,040
5Apr 26, 2026 21:12171,72089,056,48661,618,0007,070,0002,506,752
6Apr 26, 2026 21:12171,76591,404,04265,675,0003,031,0002,441,216
7Apr 26, 2026 21:12172,53085,585,78964,012,0005,000,0002,519,040
8Apr 26, 2026 21:12173,65787,389,20564,430,0005,033,0002,523,136
9Apr 26, 2026 21:12174,74791,828,68063,908,0005,991,0002,519,040