叉掉一(几)篇题解
如果我忘了看什么特殊条件当我没说
input: 4 3 1 2 100 2 3 200 3 4 500 output: 1000
https://sakura1314.blog.luogu.org/solution-p2865
这篇
输出的是1800