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 listMar 12, 2026 03:40olliecrowolliecrowScore: 4,950Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 12, 2026 03:404,76517,341,6741,906,00002,490,368
2Mar 12, 2026 03:404,81019,830,137962,000962,0002,502,656
3Mar 12, 2026 03:404,85516,308,306971,000971,0002,498,560
4Mar 12, 2026 03:404,89523,176,700979,000979,0002,494,464
5Mar 12, 2026 03:404,95022,492,4151,980,00002,498,560
6Mar 12, 2026 03:405,28016,855,3881,056,0001,056,0002,486,272
7Mar 12, 2026 03:405,90019,047,4202,360,00002,490,368
8Mar 12, 2026 03:406,38517,637,9551,277,0001,277,0002,498,560
9Mar 12, 2026 03:407,27522,443,6772,910,00002,498,560