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 listJun 11, 2026 07:47Victor MerckléVictor MerckléScore: 6,125Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 11, 2026 07:515,50510,864,27702,202,0002,179,072
2Jun 11, 2026 07:515,65010,957,74202,260,0002,179,072
3Jun 11, 2026 07:515,82710,941,98602,331,0002,179,072
4Jun 11, 2026 07:515,96011,159,70902,384,0002,179,072
5Jun 11, 2026 07:516,12511,505,00702,450,0002,179,072
6Jun 11, 2026 07:516,15211,146,10302,461,0002,179,072
7Jun 11, 2026 07:516,17211,099,3071,090,0001,379,0002,179,072
8Jun 11, 2026 07:516,17511,164,00802,470,0002,179,072
9Jun 11, 2026 07:516,18211,164,72402,473,0002,179,072