AK. 环路运输
环路运输
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.
题目描述
在一条环形公路旁均匀地分布着 座仓库,编号为 ,编号为 的仓库与编号为 的仓库之间的距离定义为 ,也就是逆时针或顺时针从 到 中较近的一种。
每座仓库都存有货物,其中编号为 的仓库库存量为 。
在 和 两座仓库之间运送货物需要的代价为 。
求在哪两座仓库之间运送货物需要的代价最大。
输入格式
第一行包含一个整数 。
第二行包含 个整数 。
输出格式
输出一个整数,表示最大代价。
5
1 8 6 2 5
15
提示
数据保证,,。
州庆线性DP,ABC班皆可做
- Status
- Done
- Problem
- 42
- Open Since
- 2025-11-12 0:00
- Deadline
- 2025-11-22 23:59
- Extension
- 24 hour(s)