摘要: /**spfa 判断有没有负权值的边;1.把源点放进队列; 2.出队 用对头进行松弛操作 3松弛操作的点进队列; 3如果 改点在队列里就不用进队列; 2 .如果进队次数多于n;return ; */#include#includeusing namespace std;const int maxn=1000+10;const int INF=0x3ffffff;int map[maxn][maxn];int used[maxn];//总进队列次数;bool qused[maxn];//队列里的元素;int d... 阅读全文
posted @ 2013-08-20 11:49 一只蚊子 阅读(165) 评论(0) 推荐(0) 编辑