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 23, 2026 11:42Dominique GarmierDominique GarmierScore: 27,765Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 23, 2026 11:4326,94232,262,8428,818,0001,959,0002,502,656
2Apr 23, 2026 11:4327,56531,583,64910,024,0001,002,0002,514,944
3Apr 23, 2026 11:4327,66529,664,3249,054,0002,012,0002,510,848
4Apr 23, 2026 11:4327,66726,733,1779,055,0002,012,0002,506,752
5Apr 23, 2026 11:4327,76528,120,6289,087,0002,019,0002,510,848
6Apr 23, 2026 11:4327,82025,138,3449,105,0002,023,0002,506,752
7Apr 23, 2026 11:4327,95728,609,3769,150,0002,033,0002,514,944
8Apr 23, 2026 11:4328,00232,836,7429,165,0002,036,0002,306,048
9Apr 23, 2026 11:4328,10525,068,2079,198,0002,044,0002,514,944