Largest Square Submatrix of all 1's C#_user

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 15, 2026 21:10Victor MerckléVictor MerckléScore: 3,987Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 15, 2026 21:112,4459,374,067978,00002,129,920stderr
2Aug 15, 2026 21:112,5529,000,3141,021,00002,129,920stderr
3Aug 15, 2026 21:112,8729,945,4161,149,00002,129,920stderr
4Aug 15, 2026 21:113,71510,271,2611,486,00002,129,920stderr
5Aug 15, 2026 21:113,9879,977,7851,595,00002,129,920stderr
6Aug 15, 2026 21:114,0529,723,3751,621,00002,142,208stderr
7Aug 15, 2026 21:114,0859,611,4541,634,00002,129,920stderr
8Aug 15, 2026 21:114,0859,551,8361,634,00002,129,920stderr
9Aug 15, 2026 21:114,14710,477,5011,659,00002,142,208stderr