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 29, 2025 11:14vahookvahookError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 14:52C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 14:52016,440,3678,302,00002,113,536expected "10000", got "255 "
2Sep 7, 2026 14:52016,430,3328,244,00002,113,536expected "10000", got "255 "
3Sep 7, 2026 14:52016,487,8338,310,00002,113,536expected "10000", got "255 "
4May 29, 2025 11:1421,59329,080,6178,637,00002,273,280
5May 29, 2025 11:1421,60529,247,0158,642,00002,486,272
6May 29, 2025 11:1421,64324,996,4528,657,00002,269,184
7May 29, 2025 11:1421,64320,803,3238,657,00002,486,272
8May 29, 2025 11:1421,64827,406,1948,659,00002,486,272
9May 29, 2025 11:1421,65326,913,2098,661,00002,486,272
10May 29, 2025 11:1421,66823,264,3838,667,00002,273,280
11May 29, 2025 11:1421,72024,992,5788,688,00002,482,176
12May 29, 2025 11:1421,77525,303,1568,710,00002,273,280