![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构之查分约束
曉_寧
这个作者很懒,什么都没留下…
展开
-
poj 3195 Candies 差分约束
题意: 有一批糖果要由班长flymouse分发给班里的小朋友,给出m对数据u,v,w,表示第v个小朋友最多比第u个小朋友多w个,但flymouse与snoopy不和,所以在满足上述约束的条件下,flymouse要尽量比snoopy多。snoopy标号1,flymouse标号n 思路: 以dis[1]=0,dis[i]表示相对dis[1]最多的糖果数。下面构造差分约束系统,对每一组数据u,v,原创 2014-08-23 10:09:13 · 619 阅读 · 0 评论 -
poj 2983 Is the Information Reliable? 差分约束
Description The galaxy war between the Empire Draco and the Commonwealth of Zibu broke out 3 years ago. Draco established a line of defense called Grot. Grot is a straight line with N defense sta原创 2014-08-26 12:36:42 · 512 阅读 · 0 评论