摘要: 这题我开了三个链表第一个是临界表第二个是缩点后的临界表第三个是hash表判重边#include#include#include#include#includeusing namespace std;#define ll long long#define maxm 1001020#define maxn 110000int nn,nn1,nn2,n,m,mod;int e[maxn],ne[maxm],v[maxm];int e1[maxn],ne1[maxm],v1[maxm];int e2[maxm],ne2[maxm],v2[maxm],u2[maxm];void add(int x,in 阅读全文
posted @ 2014-03-19 21:35 wangyucheng 阅读(320) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#include#includeusing namespace std;#define inf 0x3fffffff#define maxn 40000int e[maxn],v[maxn],ne[maxn],u[maxn];int nn=-1;void add(int x,int y,int z){ ne[++nn]=e[x],e[x]=nn,v[nn]=y,u[nn]=z;}int s,t;int ch[maxn];bool tell(){ memset(ch,-1,sizeof(ch)); queue jj; jj.... 阅读全文
posted @ 2014-03-19 19:37 wangyucheng 阅读(283) 评论(0) 推荐(0) 编辑