AT_past20_g ご飯とパン
Description
There are $ N $ bowls of rice and $ M $ slices of bread. The $ i $ -th bowl of rice has a deliciousness of $ R_i $ , and the $ i $ -th slice of bread has a deliciousness of $ P_i $ .
For the next $ K $ days, you will choose to eat either rice or bread. You will get tired of it if you eat the same dish in a row, so you will never eat rice two days in a row, or eat bread two days in a row.
Determine if this plan is feasible. If it is, find the maximum possible total deliciousness.
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ M $ $ K $ $ R_1 $ $ \ldots $ $ R_N $ $ P_1 $ $ \ldots $ $ P_M $
Output Format
Print `-1` if the plan is infeasible. Otherwise, print the maximum possible total deliciousness of the dishes that you eat.
Explanation/Hint
### Sample Explanation 1
By eating the third bowl of rice on day $ 1 $ , the second slice of bread on day $ 2 $ , and the second bowl of rice on day $ 3 $ , the total deliciousness will be $ 15 $ .
### Sample Explanation 2
The meal plan for the next $ K $ days is infeasible.
### Constraints
- $ 1\leq N,M \leq 1000 $
- $ 1\leq K \leq N+M $
- $ 1\leq R_i, P_i \leq 1000 $
- All input values are integers.