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: 116,180Success
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:0283,60750,052,55832,373,0001,070,0002,363,392
2May 10, 2026 04:02109,28761,999,71842,635,0001,080,0002,371,584
3May 10, 2026 04:02109,42061,650,58042,645,0001,123,0002,363,392
4May 10, 2026 04:02111,61564,946,31743,578,0001,068,0002,355,200
5May 10, 2026 04:02116,18064,596,87745,385,0001,087,0002,371,584
6May 10, 2026 04:02134,64272,560,70052,779,0001,078,0002,371,584
7May 10, 2026 04:02140,28574,469,18155,050,0001,064,0002,371,584
8May 10, 2026 04:02164,71284,041,10064,823,0001,062,0002,359,296
9May 10, 2026 04:02188,96794,472,21074,536,0001,051,0002,367,488