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 18, 2026 01:12Victor MerckléVictor MerckléScore: 3,775Success
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 01:173,1709,378,8441,268,0000106,496stderr
2Aug 18, 2026 01:173,5279,616,2911,411,0000106,496stderr
3Aug 18, 2026 01:173,7629,647,5511,505,000069,632stderr
4Aug 18, 2026 01:173,7679,953,1121,507,0000106,496stderr
5Aug 18, 2026 01:173,7759,494,1581,510,0000106,496stderr
6Aug 18, 2026 01:173,7829,783,9371,513,0000106,496stderr
7Aug 18, 2026 01:173,8429,766,4381,537,0000106,496stderr
8Aug 18, 2026 01:173,94510,264,7831,578,000069,632stderr
9Aug 18, 2026 01:174,0109,782,7261,604,0000106,496stderr