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 26, 2025 20:33vahookvahookError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 15:11C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 15:11096,412,70787,815,00002,113,536expected "10000", got "127 "
2Sep 7, 2026 15:11096,314,14687,814,00002,113,536expected "10000", got "127 "
3Sep 7, 2026 15:11096,322,18587,830,00002,113,536expected "10000", got "127 "
4May 26, 2025 20:33220,953106,905,87688,381,00002,531,328
5May 26, 2025 20:33221,025112,451,39188,410,00002,469,888
6May 26, 2025 20:33221,073108,680,14888,429,00002,469,888
7May 26, 2025 20:33221,228110,546,88488,491,00002,478,080
8May 26, 2025 20:33221,278113,057,75388,511,00002,273,280
9May 26, 2025 20:33221,305115,741,09988,522,00002,273,280
10May 26, 2025 20:33221,325112,188,88088,530,00002,473,984
11May 26, 2025 20:33221,340113,525,23687,542,000994,0002,273,280
12May 26, 2025 20:33221,398110,688,23788,559,00002,473,984