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 28, 2025 02:35vahookvahookError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 14:56C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 14:56020,417,80211,983,00002,113,536expected "10000", got "248 "
2Sep 7, 2026 14:56020,501,04812,062,00002,113,536expected "10000", got "248 "
3Sep 7, 2026 14:56020,400,58111,993,00002,113,536expected "10000", got "248 "
4May 28, 2025 02:3531,21830,799,26712,487,00002,273,280
5May 28, 2025 02:3531,31027,115,70212,524,00002,273,280
6May 28, 2025 02:3531,32043,175,54612,528,00002,482,176
7May 28, 2025 02:3531,33525,148,22712,534,00002,531,328
8May 28, 2025 02:3531,34026,431,59712,536,00002,490,368
9May 28, 2025 02:3531,35530,927,67512,542,00002,482,176
10May 28, 2025 02:3531,38824,491,45912,555,00002,273,280
11May 28, 2025 02:3531,54834,206,64512,619,00002,478,080
12May 28, 2025 02:3531,55827,395,16512,623,00002,494,464