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 15:47Victor MerckléVictor MerckléScore: 17,637Success
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 15:496,91711,638,5091,384,0001,383,0002,117,632stderr
2Aug 15, 2026 15:4910,22712,019,7281,323,0002,768,0002,117,632stderr
3Aug 15, 2026 15:4917,00514,856,8403,401,0003,401,0002,117,632stderr
4Aug 15, 2026 15:4917,38515,765,1593,477,0003,477,0002,117,632stderr
5Aug 15, 2026 15:4917,63714,957,8333,528,0003,527,0002,117,632stderr
6Aug 15, 2026 15:4917,77216,450,3183,554,0003,555,0002,117,632stderr
7Aug 15, 2026 15:4918,38015,359,7273,676,0003,676,0002,117,632stderr
8Aug 15, 2026 15:4919,26215,665,5623,853,0003,852,0002,117,632stderr
9Aug 15, 2026 15:4920,79016,266,6754,144,0004,172,0002,117,632stderr