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 SequeiraScore: 123,462Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 10, 2026 04:0352,05237,985,17619,728,0001,093,0002,355,200
2May 10, 2026 04:0373,53044,927,50828,370,0001,042,0002,367,488
3May 10, 2026 04:0374,01046,934,08928,520,0001,084,0002,363,392
4May 10, 2026 04:03106,04061,141,96841,314,0001,102,0002,355,200
5May 10, 2026 04:03123,46265,561,23948,338,0001,047,0002,355,200
6May 10, 2026 04:03123,54067,091,38748,357,0001,059,0002,363,392
7May 10, 2026 04:03124,50064,061,34148,741,0001,059,0002,367,488
8May 10, 2026 04:03152,18077,209,83159,818,0001,054,0002,375,680
9May 10, 2026 04:03191,93095,263,41975,710,0001,062,0002,359,296