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 listAug 24, 2025 21:58Oleg KovalovOleg KovalovScore: 3,717,413Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 24, 2025 21:583,715,3431,508,715,0741,449,159,00036,978,0002,412,544
2Aug 24, 2025 21:583,715,5481,509,904,4321,442,243,00043,976,0002,461,696
3Aug 24, 2025 21:583,715,9281,508,961,9171,440,391,00045,980,0002,326,528
4Aug 24, 2025 21:583,717,3781,513,799,0531,434,988,00051,963,0002,404,352
5Aug 24, 2025 21:583,717,4131,515,654,1631,433,003,00053,962,0002,277,376
6Aug 24, 2025 21:583,717,4281,513,236,2791,447,998,00038,973,0002,330,624
7Aug 24, 2025 21:583,717,9231,508,354,3961,445,193,00041,976,0002,523,136
8Aug 24, 2025 21:583,719,7331,514,246,0891,450,921,00036,972,0002,392,064
9Aug 24, 2025 21:583,906,4851,583,531,1051,523,605,00038,989,0002,297,856