CF802N April Fools' Problem (medium)
Description
The marmots need to prepare $ k $ problems for HC $ ^{2} $ over $ n $ days. Each problem, once prepared, also has to be printed.
The preparation of a problem on day $ i $ (at most one per day) costs $ a_{i} $ CHF, and the printing of a problem on day $ i $ (also at most one per day) costs $ b_{i} $ CHF. Of course, a problem cannot be printed before it has been prepared (but doing both on the same day is fine).
What is the minimum cost of preparation and printing?
Input Format
N/A
Output Format
N/A
Explanation/Hint
In the sample testcase, one optimum solution is to prepare the first problem on day $ 1 $ and print it on day $ 1 $ , prepare the second problem on day $ 2 $ and print it on day $ 4 $ , prepare the third problem on day $ 3 $ and print it on day $ 5 $ , and prepare the fourth problem on day $ 6 $ and print it on day $ 8 $ .