P5851 (USACO19DEC) Greedy Pie Eaters P
区间 dp ,注意枚举端点 i,j,k 的顺序,模拟一下就好了,如果使用了未更新的状态,就是错的
sorry for that i don’t have a chinese input method
Functions:
g(x, l, r) means we have the largest cow which can eat pos(x) , and it can only affect pies in [l, r]
f(x, l, r) means the weight summary that we can get from a sequence of cows, and it only affect pies in [l, r]
So we have the things below:
1 | foreach cow_i |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Cauphenuny's Blog!
评论