Time Limit: 1500MS Memory Limit: 131072K Description During the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse's class a large bag of candies and had flymouse distribute them. All…
原题:ZOJ 3668 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3668 典型差分约束题. 将sum[0] ~ sum[n] 作为节点,A<=sum[R]-sum[L-1]<=B可以分别建边: x(L-1)-->xR w = B xR --> x(L-1) w = -A 注意还有 -10000<=sum[i]-sum[i-1]<=10000 (for i in (2,n)),所以相邻点…