0_0_32008597_23099.cpp:3:10: error: #include expects "FILENAME" or <FILENAME>
#include #include #include #define N 101
^
0_0_32008597_23099.cpp:10:9: error: 'N' was not declared in this scope
road pa[N*N];
^
0_0_32008597_23099.cpp:10:11: error: 'N' was not declared in this scope
road pa[N*N];
^
0_0_32008597_23099.cpp:11:9: error: 'N' was not declared in this scope
int bin[N];
^
0_0_32008597_23099.cpp: In function 'bool cmp(road, road)':
0_0_32008597_23099.cpp:16:1: error: expected ';' before '}' token
}
^
0_0_32008597_23099.cpp: In function 'int findl(int)':
0_0_32008597_23099.cpp:22:7: error: 'bin' was not declared in this scope
while(bin[r]!=r)
^
0_0_32008597_23099.cpp: In function 'int kruskal(int)':
0_0_32008597_23099.cpp:35:6: error: 'pa' was not declared in this scope
sort(pa,pa+t,cmp);
^
0_0_32008597_23099.cpp:39:17: error: expected ';' before '{' token
for(int i=0;i { int fx=findl(pa[i].b); int fy=findl(pa[i].e); if(fx!=fy) { bin[fx]=fy; s+=pa[i].w; } } return s;}int main(){ ////freopen("in.txt", "r", stdin); int n; int m; while(~scanf("%d",&n)&&n) { m=n*(n-1)/2; for(int i=0;i<=n;i++) bin[i]=i; for(int i=0;i { scanf("%d%d%d%d",&pa[i].b,&pa[i].e,&pa[i].w,&pa[i].s); if(pa[i].s) { int x=findl(pa[i].b); int y=findl(pa[i].e); if(x!=y) bin[x]=y; } } int ans=kruskal(m); printf("%d\n",ans); }}
^
0_0_32008597_23099.cpp:39:17: error: expected primary-expression before '{' token
0_0_32008597_23099.cpp:39:17: error: expected ')' before '{' token
0_0_32008597_23099.cpp:39:111: error: 'bin' was not declared in this scope
for(int i=0;i { int fx=findl(pa[i].b); int fy=findl(pa[i].e); if(fx!=fy) { bin[fx]=fy; s+=pa[i].w; } } return s;}int main(){ ////freopen("in.txt", "r", stdin); int n; int m; while(~scanf("%d",&n)&&n) { m=n*(n-1)/2; for(int i=0;i<=n;i++) bin[i]=i; for(int i=0;i { scanf("%d%d%d%d",&pa[i].b,&pa[i].e,&pa[i].w,&pa[i].s); if(pa[i].s) { int x=findl(pa[i].b); int y=findl(pa[i].e); if(x!=y) bin[x]=y; } } int ans=kruskal(m); printf("%d\n",ans); }}
^
0_0_32008597_23099.cpp: In function 'int main()':
0_0_32008597_23099.cpp:39:178: error: expected '}' at end of input
for(int i=0;i { int fx=findl(pa[i].b); int fy=findl(pa[i].e); if(fx!=fy) { bin[fx]=fy; s+=pa[i].w; } } return s;}int main(){ ////freopen("in.txt", "r", stdin); int n; int m; while(~scanf("%d",&n)&&n) { m=n*(n-1)/2; for(int i=0;i<=n;i++) bin[i]=i; for(int i=0;i { scanf("%d%d%d%d",&pa[i].b,&pa[i].e,&pa[i].w,&pa[i].s); if(pa[i].s) { int x=findl(pa[i].b); int y=findl(pa[i].e); if(x!=y) bin[x]=y; } } int ans=kruskal(m); printf("%d\n",ans); }}
^
|