Yifan remembered a game that he used to play as a kid - hopscotch. The game is made of two rows of $$$n$$$ squares $$$(1\le n\le10^5)$$$. The $$$i$$$-th square on the left is assigned with an integer value $$$a_i$$$ $$$(-10^4\le a_i\le 10^4)$$$ and the $$$i$$$-th square on the right is assigned with value $$$b_i$$$ $$$(-10^4\le b_i\le 10^4)$$$. The player starts with the left foot on $$$a_1$$$ and the right foot on $$$b_1$$$ and must eventually ends on $$$a_n$$$ and $$$b_n$$$.
The game continues by making steps: In each step, the player can pick one foot and move forward in the same row. The goal of his game is to maximize the sum of the values of all the scores he steps on. You may take multiple steps on the same foot.
After recalling the rules of the game, Yifan challenges Michael to it. Due to physical limitations, Michael's feet cannot be over $$$K$$$ $$$(1\le K\le n)$$$ squares away from each other. More formally, if the left foot is on $$$a_i$$$ and the right foot is on $$$b_j$$$, $$$|i-j|\le K$$$ must hold. However, Michael still wants to win the game to demonstrate his brilliance. What's the maximum score Michael can get?
The first line contains two integers $$$n,K$$$ $$$(1\le K\le n\le5\times10^5)$$$- the number of elements in the array.
The second line contains $$$n$$$ integers $$$a_1,a_2,\dots,a_n$$$ $$$(-10^4\le a_i\le 10^4)$$$ - the values of squares on the left.
The second line contains $$$n$$$ integers $$$b_1,b_2,\dots,b_n$$$ $$$(-10^4\le a_i\le 10^4)$$$ - the values of squares on the right.
Print the answer - the maximum score Michael can get.
4 1 0 2 2 8 0 -10 5 2
19
7 2 0 -10 -6 2 -10 0 0 5 3 -2 -1 -10 -10 0
9
In the first case 1, your score is $$$0 + 2 + 2 + 8 + 0 + 5 + 2 = 19$$$.
In the second case 2, your score is $$$0 + 2 + 0 + 0 + 5 + 3 + -1 + 0 = 9$$$.
| Name |
|---|


