0_0_29404601_32412.cpp: In function 'void spfa()':
0_0_29404601_32412.cpp:19:155: error: 'struct edge' has no member named 'cot'
for(int i=head[v];i!=-1;i=rode[i].next) { edge e=rode[i]; if(d[e.to]>d[v]+e.cost) { d[e.to]=d[v]+e.cot; if(!vis[e.to]) { P.push(e.to);
^
0_0_29404601_32412.cpp: In function 'int main()':
0_0_29404601_32412.cpp:40:943: error: expected '}' at end of input
if(e.cap>0&&level[e.to]>level[v]) { int d=dfs(e.to,t,min(f,e.cap)); if(d>0) { e.cap-=d; G[e.to][e.rev].cap+=d; return d; } } } return 0;}int max_flow(int v,int t){ ADD(); int flow=0; while(1) { bfs(v); if(level[t]<0)return flow; memset(iter,0,sizeof(iter)); int f; while((f=dfs(v,t,inf))>0)flow+=f; }}int main(){ int T;scanf("%d",&T); while(T--) { tol=0; memset(head,-1,sizeof(head)); int n;scanf("%d",&n); for(int i=0; ;i++) { int a,b,c; scanf("%d%d%d",&a,&b,&c); from[i]=a;to[i]=b;cost[i]=c; if(a==0&&b==0&&c==0)break; add(a,b,c);add(b,a,c); } spfa(); if(n==1) { printf("0\n"); continue; } printf("%d\n",max_flow(1,n));//若n==1则1到1无法跑最大流 } return 0;}
^
0_0_29404601_32412.cpp:40:943: error: expected '}' at end of input
|