The only difference between the easy and the hard version is of contraints !!
Akshay is partiicipating in a hurdle race and he really wants to win, but the hurdle race is very unconventional because it was organised by the CP wing. In this race there are N flags between the start and finish and you have to jump so that you land at exactly X of these flags.
The ith flag is worth Ai points, and the score of a person is the sum of points of all the flags he/she lands at. Now the unconventional part is, the winner of the race is not the person who gets to the finish first, but rather the person who has the most points.
Akshay really wants to win the race, but he can only jump a maximum distance of k flags away at once, he asked for your help to find out what's the maximum score he can have to find out if he has any chance of winning
Input:
The first line of the input contains three integers n,k and x — the number of flags between the start and the finish, the maximum length that Akshay can jump and the number of flags that akshay has to jump to
The second line of the input contains n integers a1,a2,…,an ,where ai is the value of the i-th flag.
Output:
Print -1 if there is no way for Akshay to finish the race
Otherwise print one integer — the maximum score that Akshay can have in the race
Constraints:
1<= k,n,x <=200
1<= Ai <= 1e9