#P1304F1. Animal Observation (easy version)
Animal Observation (easy version)
No submission language available for this problem.
Description
The only difference between easy and hard versions is the constraint on .
Gildong loves observing animals, so he bought two cameras to take videos of wild animals in a forest. The color of one camera is red, and the other one's color is blue.
Gildong is going to take videos for days, starting from day to day . The forest can be divided into areas, numbered from to . He'll use the cameras in the following way:
- On every odd day (-st, -rd, -th, ...), bring the red camera to the forest and record a video for days.
- On every even day (-nd, -th, -th, ...), bring the blue camera to the forest and record a video for days.
- If he starts recording on the -th day with one of the cameras, the camera records for only one day.
Each camera can observe consecutive areas of the forest. For example, if and , he can put a camera to observe one of these three ranges of areas for two days: , , and .
Gildong got information about how many animals will be seen in each area each day. Since he would like to observe as many animals as possible, he wants you to find the best way to place the two cameras for days. Note that if the two cameras are observing the same area on the same day, the animals observed in that area are counted only once.
The first line contains three integers , , and (, , ) – the number of days Gildong is going to record, the number of areas of the forest, and the range of the cameras, respectively.
Next lines contain integers each. The -th integer in the -st line is the number of animals that can be seen on the -th day in the -th area. Each number of animals is between and , inclusive.
Print one integer – the maximum number of animals that can be observed.
Input
The first line contains three integers , , and (, , ) – the number of days Gildong is going to record, the number of areas of the forest, and the range of the cameras, respectively.
Next lines contain integers each. The -th integer in the -st line is the number of animals that can be seen on the -th day in the -th area. Each number of animals is between and , inclusive.
Output
Print one integer – the maximum number of animals that can be observed.
Samples
Note
The optimal way to observe animals in the four examples are as follows:
Example 1:

Example 2:

Example 3:

Example 4:
