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 listAug 18, 2026 13:13Victor MerckléVictor MerckléScore: 3,692Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 18, 2026 13:163,1559,344,6241,262,000069,632stderr
2Aug 18, 2026 13:163,2059,283,9851,282,0000102,400stderr
3Aug 18, 2026 13:163,4929,463,9471,397,000053,248stderr
4Aug 18, 2026 13:163,5909,570,90501,436,00053,248stderr
5Aug 18, 2026 13:163,6929,613,5981,477,000053,248stderr
6Aug 18, 2026 13:163,7229,564,4001,489,000053,248stderr
7Aug 18, 2026 13:163,7409,497,1861,496,000053,248stderr
8Aug 18, 2026 13:163,7629,676,3051,505,0000102,400stderr
9Aug 18, 2026 13:163,8009,596,3341,520,000053,248stderr