trip
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
A.trip
题目描述
张三要进行 天的旅行,第 天的费用为 。他还可以使用优惠券,可以免除 天(不用连续)的费用,价格为 。如果剩余 天,优惠券的作用是 天,那么依然可以使用。
求这 天旅行的最小费用。
输入格式
第一行有 个整数
第二行有 个整数,第 个为
输出格式
输出最小花费
样例
5 2 10
7 1 6 3 6
20
8 3 1000000000
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000
3000000000
数据范围与提示
样例一解释
- 使用一张优惠券免除 天的费用,总费用为 。
0226B
- Status
- Done
- Rule
- IOI
- Problem
- 4
- Start at
- 2026-2-26 8:00
- End at
- 2026-2-26 11:39
- Duration
- 3.7 hour(s)
- Host
- Partic.
- 80