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 listMay 31, 2025 23:01vahookvahookError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 14:41C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 14:42016,851,0085,886,0001,030,0002,117,632expected "10000", got " "
2Sep 7, 2026 14:42016,785,2616,892,00002,117,632expected "10000", got " "
3Sep 7, 2026 14:42016,875,8325,919,0001,008,0002,117,632expected "10000", got " "
4May 31, 2025 23:0118,53529,380,2406,355,0001,059,0002,396,160
5May 31, 2025 23:0118,55023,989,0006,360,0001,060,0002,396,160
6May 31, 2025 23:0118,56327,449,4167,425,00002,277,376