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 listSep 10, 2026 14:25Andrew EpsteinAndrew EpsteinScore: 4,917Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 10, 2026 14:294,75511,945,07601,902,0002,121,728
2Sep 10, 2026 14:294,78012,081,00601,912,0002,121,728
3Sep 10, 2026 14:294,82012,038,08701,928,0002,121,728
4Sep 10, 2026 14:294,88212,093,51801,953,0002,121,728
5Sep 10, 2026 14:294,91711,980,79801,967,0002,121,728
6Sep 10, 2026 14:295,09712,112,67502,039,0002,121,728
7Sep 10, 2026 14:295,12712,175,09702,051,0002,121,728
8Sep 10, 2026 14:295,13012,041,91802,052,0002,121,728
9Sep 10, 2026 14:295,41012,265,03602,164,0002,121,728