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 22:48vahookvahookError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 14:45C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 14:46017,192,1207,351,00002,117,632expected "10000", got " "
2Sep 7, 2026 14:46017,195,9297,317,00002,117,632expected "10000", got " "
3Sep 7, 2026 14:46017,297,7667,361,00002,117,632expected "10000", got " "
4May 31, 2025 22:4819,71325,172,2645,914,0001,971,0002,277,376
5May 31, 2025 22:4819,71529,050,6605,915,0001,971,0002,281,472
6May 31, 2025 22:4819,73028,715,6547,892,00002,281,472
7May 31, 2025 22:4819,73326,775,8215,920,0001,973,0002,396,160
8May 31, 2025 22:4819,73527,821,7665,921,0001,973,0002,281,472
9May 31, 2025 22:4819,74027,447,7966,909,000987,0002,277,376
10May 31, 2025 22:4819,76025,363,3705,928,0001,976,0002,400,256
11May 31, 2025 22:4820,15024,080,1856,045,0002,015,0002,400,256
12May 31, 2025 22:4820,83024,182,9676,249,0002,083,0002,392,064