#### Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

## Problem Description

Guangxuan has been shopping for Chunlians during CNY. When he entered the shop, he found *N* Chunlians hung on the wall, from left to right. Each Chunlian had a certain value *P _{i}*.

He needs to buy *C* Chunlians for his family. Furthermore, due to his laziness, he wants to select the Chunlians such that no two Chunlians (including non-consecutive ones) are more than distance *K* apart from one another on the wall.

Help Guangxuan determine the maximum value he can obtain.

## Input

The first line of input will contain three integers, *N*, *C* and *K*.

The second line of input will contain *N* integers, representing the array *P*.

## Output

The output should contain one integer, representing the maximum value Gug can obtain.

## Limits

For all subtasks: 1 ≤ C ≤ N, C - 1 ≤ K < N, 1 ≤ P_{i} ≤ 10^{9}.

Subtask 1 (13%): 1 ≤ N ≤ 20.

Subtask 2 (15%): 1 ≤ N ≤ 200.

Subtask 3 (17%): 1 ≤ N ≤ 1000.

Subtask 4 (12%): 1 ≤ N ≤ 300000, 1 ≤ P_{i} ≤ 2.

Subtask 5 (14%): 1 ≤ N ≤ 300000, 1 ≤ C ≤ 2.

Subtask 6 (29%): 1 ≤ N ≤ 300000.

Subtask 7 (0%): Sample Testcases

## Sample Testcase 1

### Input

5 2 3 8 1 2 3 5

### Output

11

## Sample Testcase 2

### Input

7 3 4 5 7 1 6 3 5 9

### Output

20

### Tags

### Subtasks and Limits

Subtask | Score | #TC | Time | Memory | Scoring |
---|---|---|---|---|---|

1 | 13 | 20 | 1s | 256MB | Minimum |

2 | 15 | 40 | 1s | 256MB | Minimum |

3 | 17 | 60 | 1s | 256MB | Minimum |

4 | 12 | 20 | 1s | 256MB | Minimum |

5 | 14 | 20 | 1s | 256MB | Minimum |

6 | 29 | 120 | 1s | 256MB | Minimum |

7 | 0 | 2 | 1s | 256MB | Minimum |

### Judge Compile Command

g++ ans.cpp -o chunlian -Wall -static -O2 -lm -m64 -s -w -std=gnu++14 -fmax-errors=512