tag是假的,用了及其诡异的方法判负环 正权无向边和负权有向边的图 #include<iostream> #include<cstdio> #include<cstring> using namespace std; const int N=505,inf=210000000; int n,m,w,h[N],cnt,d[N]; struct qwe { int ne,to,va; }e[N*N]; int read() { int r=0,f=1; char p=get…
POJ 3259 Wormholes Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu Description While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way…
题目链接:http://poj.org/problem?id=3259 Wormholes Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 44090 Accepted: 16203 Description While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is ver…