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 listMay 11, 2026 14:46Victor MerckléVictor MerckléScore: 4,750Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 11, 2026 14:483,78010,396,1661,512,00002,215,936
2May 11, 2026 14:484,01211,574,54401,605,0002,215,936
3May 11, 2026 14:484,20210,694,5141,681,00002,170,880
4May 11, 2026 14:484,74211,764,9641,897,00002,170,880
5May 11, 2026 14:484,75010,514,9611,900,00002,215,936
6May 11, 2026 14:484,81511,361,0801,926,00002,170,880
7May 11, 2026 14:484,84011,458,8971,936,00002,215,936
8May 11, 2026 14:485,24210,244,91502,097,0002,170,880
9May 11, 2026 14:485,48010,072,65702,192,0002,215,936