CodeForces1249E-By Elevator or Stairs?-好理解自己想不出来的dp
Input The first line of the input contains two integers n n and c c ( 2 ≤ n ≤ 2 ⋅ 10 5 , 1 ≤ c ≤ 1000 2≤n≤2⋅105,1≤c≤1000) — the number of floors in the building and the time overhead for the elevator rides. The second line of the input contains n − 1 n−1 integers a 1 , a 2 , … , a n − 1 a1,a2,…,an−1 ( 1 ≤ a i ≤ 1000 1≤ai≤1000), where a i ai is the time required to go from the i i-th floor to the ( i + 1 ) (i+1)-th one (and from the ( i + 1 ) (i+1)-th to the i i-th as well) using the stairs. The third line of the input contains n − 1 n−1 integers b 1 , b 2 , … , b n − 1 b1,b2,…,bn−1 ( 1 ≤ b i ≤