![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构优化dp
dp优化——数据结构
NephrenRuqInsania
这个作者很懒,什么都没留下…
展开
-
[USACO13DEC] 最优挤奶Optimal Milking
题目描述Farmer John has recently purchased a new barn containing N milking machines (1 <= N <= 40,000), conveniently numbered 1…N and arranged in a row.Milking machine i is capable of extracting M...原创 2020-01-29 16:16:33 · 518 阅读 · 0 评论 -
[USACO17FEB] Why Did the Cow Cross the Road
这题真的是“写题五分钟,想题两小时”啊我们考虑一个dpdpdp,我们用dpi,jdp_{i,j}dpi,j表示第一排匹配到iii,第二排匹配到jjj,并且i,ji,ji,j相匹配那么转移方程就是dpi,j=max{dpk,j}+1,k<i,bj∈[max(1,ai−4),max(n,ai+4)]dp_{i,j}=\max\{dp_{k,j}\}+1,k< i,b_j\in...原创 2020-04-03 14:27:17 · 152 阅读 · 0 评论