http://acm.sdut.edu.cn:8080/vjudge/contest/view.action?cid=267#problem/B B - Is the Information Reliable? Time Limit:3000MS Memory Limit:131072KB 64bit IO Format:%I64d & %I64u Description The galaxy war between the Empi…
http://poj.org/problem?id=2983 题意:给出M条信息,判断这些信息的正确性.(1)V A B :表示A,B之间的距离>=1; (2)P A B X :表示A B之间的距离为x. 思路:dis[i]表示i到原点的距离,由(1)知 dis[A]<=dis[B]-1 即B->A之间有一条边,权值为-1:由(2)知: dis[A]<=dis[B]-x && dis[B] <= dis[A]+x,即A->B的权值为-x,B->A的…
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 stations. Because of the cooperation of the stations, Zibu…
http://poj.org/problem?id=2983 题目大意: 星际大战开始了.你购买了情报,需要判断它的准确性.已知地方的根据地在由南向北排成一条直线.P A B X,表示A在B北面距离X光年的地方,另一种是V A B,表示只知道A在B的北面至少1光年的地方. 思路: 可转化为差分约束. 对于P A B X来说因为A-B=X (因为他们相距X光年,我们取北边为正方向) 可以记做: A-B >=X && A-B<=X,即A-B>=X && B…
Is the Information Reliable? Time Limit: 3000MS Memory Limit: 131072K Total Submissions: 11125 Accepted: 3492 Description The galaxy war between the Empire Draco and the Commonwealth of Zibu broke out 3 years ago. Draco established a line of defe…