摘要: 题意:famer给出一些fields,paths,wormholes.其中paths是fields之间的双向正权值边,wormholes是fields之间的单向负权边。求在这个图中是否存在权值为负的回路。这个题用的是bellman_ford算法。其中有一下几个问题:1.在描述Paths时,a bidirectional path between S and E that requires T seconds to traverse. Two fields might be connected by more than one path. 当时没有看到是双向边,WA了。还有,我没有对后半句处理, 阅读全文
posted @ 2012-08-02 20:02 pushing my way 阅读(257) 评论(0) 推荐(0) 编辑