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 3, 2025 23:52zielajzielajError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 10:54C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 10:5509,335,7091,092,00002,117,632expected "300", got "57 "
2Sep 5, 2026 10:5509,431,9451,113,00002,117,632expected "300", got "57 "
3Sep 5, 2026 10:5509,336,2621,095,00002,117,632expected "300", got "57 "
4Jun 3, 2025 23:523,96016,476,81401,584,0002,428,928
5Jun 3, 2025 23:524,01317,057,0991,605,00002,428,928
6Jun 3, 2025 23:524,10016,479,5171,640,00002,428,928
7Jun 3, 2025 23:524,13015,172,8301,652,00002,424,832
8Jun 3, 2025 23:524,19015,308,8201,676,00002,506,752
9Jun 3, 2025 23:524,19815,553,68701,679,0002,424,832
10Jun 3, 2025 23:524,25019,211,8121,700,00002,412,544
11Jun 3, 2025 23:524,46519,284,61801,786,0002,420,736
12Jun 3, 2025 23:524,53516,335,90801,814,0002,420,736