注意:去掉反向边View Code #include<stdio.h>#include<string.h>#include<algorithm>using namespace std;#define maxn 10004#define maxm 100055#define inf 1000000000int min(int a, int b){ return a < b ? a : b;}struct E{ int v, next;}edge[maxm<<1];int head[maxn], tot;int n, m;void add(in Read More
posted @ 2012-11-01 20:57 To be an ACMan Views(177) Comments(0) Diggs(0)
View Code #include<stdio.h>#include<string.h>#define maxn 110#define maxm maxn * maxn#define inf 1000000000int min(int a, int b){ return a < b ? a : b;}struct E{ int v, next;}edge[maxm<<1];int head[maxn], tot;int n, m;void add(int s, int t){ edge[tot].v = t; edge[tot].next = hea Read More
posted @ 2012-11-01 20:49 To be an ACMan Views(152) Comments(0) Diggs(0)