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 9, 2026 14:30E SequeiraE SequeiraError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 7, 2026 14:39C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 14:390118,991,708108,100,0001,013,0002,113,536expected "10000", got "255 "
2Sep 7, 2026 14:390118,919,237107,982,0001,020,0002,113,536expected "10000", got "255 "
3Sep 7, 2026 14:390118,873,063107,973,0001,041,0002,113,536expected "10000", got "255 "
4May 9, 2026 14:31273,780128,790,439108,455,0001,057,0002,322,432
5May 9, 2026 14:31273,807126,768,361108,502,0001,021,0002,322,432
6May 9, 2026 14:31273,917126,471,829108,535,0001,032,0002,318,336
7May 9, 2026 14:31273,917128,770,314108,521,0001,046,0002,322,432
8May 9, 2026 14:31273,950126,549,192108,538,0001,042,0002,318,336
9May 9, 2026 14:31274,035126,047,791108,543,0001,071,0002,322,432
10May 9, 2026 14:31274,190126,699,590108,617,0001,059,0002,310,144
11May 9, 2026 14:31274,217125,538,042108,633,0001,054,0002,334,720
12May 9, 2026 14:31274,227127,993,443108,643,0001,048,0002,330,624