yh2021shx / yh2021shx.github.io

0 stars 0 forks source link

ABC302 G 题题解 | yh2021shx's blog #7

Open yh2021shx opened 11 months ago

yh2021shx commented 11 months ago

https://yh2021shx.github.io/2023/06/29/ABC302G/

1 题目大意1.1 题目翻译 有两个人轮流取物品。总共有 $n$ 个物品,第 $i$ 个物品的价值为 $w_i$。 他们按照下面的其中一种方式取物品: 取出这一排物品最前面的或者最后面的。这一步没有代价。 设还剩下 $m$ 个物品,那么重复取出 $\min(B, m)$ 个物品,每次取出最前面的或者最后面的。这一步的代价为 $A$。 设还剩下 $m$ 个物品,那么重复取出 $\min(D,