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 22, 2026 11:44Dominique GarmierDominique GarmierScore: 32,965Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 22, 2026 11:4525,90726,508,9838,291,0002,072,0002,506,752
2Apr 22, 2026 11:4527,99731,823,9849,163,0002,036,0002,502,656
3Apr 22, 2026 11:4530,61729,721,76710,206,0002,041,0002,519,040
4Apr 22, 2026 11:4532,61529,630,49211,039,0002,007,0002,514,944
5Apr 22, 2026 11:4532,96530,445,55811,158,0002,028,0002,498,560
6Apr 22, 2026 11:4532,96732,998,91911,159,0002,028,0002,514,944
7Apr 22, 2026 11:4532,98230,429,80711,164,0002,029,0002,514,944
8Apr 22, 2026 11:4533,35230,303,93512,315,0001,026,0002,506,752
9Apr 22, 2026 11:4533,54031,517,28512,298,0001,118,0002,510,848