Largest Square Submatrix of all 1's NoSIMD_C#

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 10, 2026 04:01E SequeiraE SequeiraError
Source Code

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

Challenge History
DateChallengerCostTypeStatus
Sep 5, 2026 11:11NoSIMD_C#10.00CustomSolution Broken
Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 5, 2026 11:12076,846,18665,695,0001,034,0002,113,536expected "300", got "255 "
2Sep 5, 2026 11:12076,636,37965,262,0001,023,0002,113,536expected "300", got "255 "
3Sep 5, 2026 11:12077,440,58165,448,0001,101,0002,113,536expected "300", got "255 "
4May 10, 2026 04:0352,05237,985,17619,728,0001,093,0002,355,200
5May 10, 2026 04:0373,53044,927,50828,370,0001,042,0002,367,488
6May 10, 2026 04:0374,01046,934,08928,520,0001,084,0002,363,392
7May 10, 2026 04:03106,04061,141,96841,314,0001,102,0002,355,200
8May 10, 2026 04:03123,46265,561,23948,338,0001,047,0002,355,200
9May 10, 2026 04:03123,54067,091,38748,357,0001,059,0002,363,392
10May 10, 2026 04:03124,50064,061,34148,741,0001,059,0002,367,488
11May 10, 2026 04:03152,18077,209,83159,818,0001,054,0002,375,680
12May 10, 2026 04:03191,93095,263,41975,710,0001,062,0002,359,296