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 17, 2026 11:41Tomislav TunkovicTomislav TunkovicScore: 4,215Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 17, 2026 11:444,0679,780,91801,627,00053,248
2Aug 17, 2026 11:444,1229,744,9771,649,000053,248
3Aug 17, 2026 11:444,1329,760,03501,653,00053,248
4Aug 17, 2026 11:444,1429,877,3441,657,000053,248
5Aug 17, 2026 11:444,21510,389,19101,686,00053,248
6Aug 17, 2026 11:444,2329,762,72301,693,00053,248
7Aug 17, 2026 11:444,24218,701,83901,697,00053,248
8Aug 17, 2026 11:444,4079,885,24901,763,00053,248
9Aug 17, 2026 11:444,47716,163,77801,791,00053,248