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 20, 2026 16:29Dominique GarmierDominique GarmierScore: 47,255Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 20, 2026 16:3130,17026,578,79910,057,0002,011,0002,490,368
2Apr 20, 2026 16:3137,50732,760,81613,003,0002,000,0002,494,464
3Apr 20, 2026 16:3142,50742,547,22815,003,0002,000,0002,498,560
4Apr 20, 2026 16:3147,20551,727,55416,895,0001,987,0002,490,368
5Apr 20, 2026 16:3147,25541,978,74716,913,0001,989,0002,506,752
6Apr 20, 2026 16:3147,76543,360,24217,095,0002,011,0002,494,464
7Apr 20, 2026 16:3147,95048,474,68017,161,0002,019,0002,490,368
8Apr 20, 2026 16:3147,98043,529,95217,172,0002,020,0002,490,368
9Apr 20, 2026 16:3149,86246,591,73717,951,0001,994,0002,502,656