摘要:
#include#include#include#include#includeusing namespace std;#define maxn 12000int e[maxn],v[maxn*2],ne[maxn*2],w[maxn*2];bool vis[maxn];int n;int nn;void add(int x,int y,int z){nn++;ne[nn]=e[x];e[x]=nn;v[nn]=y;w[nn]=z;}void clear(){nn=0;memset(vis,0,sizeof(vis));memset(e,0,sizeof(e));}int tot,a[maxn 阅读全文