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 listJun 4, 2025 21:23vahookvahookError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 4, 2026 18:30Victor Mercklé10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 4, 2026 18:30010,824,5521,137,00002,117,632expected "2", got "50 "
2Sep 4, 2026 18:30010,771,2541,221,00002,117,632expected "2", got "50 "
3Sep 4, 2026 18:30010,745,6391,133,00002,117,632expected "2", got "50 "
4Jun 4, 2025 21:233,46819,553,51701,387,0002,387,968
5Jun 4, 2025 21:233,47818,406,7081,391,00002,392,064
6Jun 4, 2025 21:233,68520,671,8481,474,00002,400,256
7Jun 4, 2025 21:233,70518,895,86001,482,0002,392,064
8Jun 4, 2025 21:233,82020,191,54801,528,0002,387,968
9Jun 4, 2025 21:233,86822,855,55301,547,0002,400,256
10Jun 4, 2025 21:233,90016,987,71501,560,0002,400,256
11Jun 4, 2025 21:233,92318,762,14201,569,0002,400,256
12Jun 4, 2025 21:233,96818,110,36501,587,0002,392,064