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 16, 2026 07:37Victor MerckléVictor MerckléScore: 3,430Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 16, 2026 07:392,4077,995,338963,00002,113,536
2Jun 16, 2026 07:393,0708,553,1761,228,00002,113,536
3Jun 16, 2026 07:393,2628,471,3461,305,00002,113,536
4Jun 16, 2026 07:393,3358,450,2691,334,00002,113,536
5Jun 16, 2026 07:393,4309,689,1281,372,00002,113,536
6Jun 16, 2026 07:394,4709,047,1241,788,00002,113,536
7Jun 16, 2026 07:394,7429,092,4851,897,00002,113,536
8Jun 16, 2026 07:394,8529,062,1571,941,00002,113,536
9Jun 16, 2026 07:395,1879,249,5402,075,00002,113,536