Problem2880--【Div2】CSP-J2023 P2 公路

2880: 【Div2】CSP-J2023 P2 公路

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

【注】本题为CSP-J2023第二轮认证的第二题




Sample Input Copy

5 4
10 10 10 10
9 8 9 6 5

Sample Output Copy

79

Source/Category