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:41C#_user10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 7, 2026 14:410152,226,395140,069,0001,077,0002,113,536expected "10000", got "255 "
2Sep 7, 2026 14:410151,297,195140,057,0001,063,0002,113,536expected "10000", got "255 "
3Sep 7, 2026 14:410151,141,511140,056,0001,056,0002,113,536expected "10000", got "255 "
4May 9, 2026 14:33352,827159,568,896140,105,0001,026,0002,338,816
5May 9, 2026 14:33352,862160,150,113140,114,0001,031,0002,318,336
6May 9, 2026 14:33352,885158,795,932140,114,0001,040,0002,326,528
7May 9, 2026 14:33352,892155,828,102140,114,0001,043,0002,322,432
8May 9, 2026 14:33352,922157,902,699140,122,0001,047,0002,322,432
9May 9, 2026 14:33353,117157,063,637140,188,0001,059,0002,330,624
10May 9, 2026 14:33353,180156,334,094140,208,0001,064,0002,322,432
11May 9, 2026 14:33353,187156,591,628140,210,0001,065,0002,330,624
12May 9, 2026 14:33353,275159,998,828140,241,0001,069,0002,326,528