F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_38227902_7064.cpp:1:1: error: 'include' does not name a type
 include <cstdio>
 ^
0_0_38227902_7064.cpp: In function 'int main()':
0_0_38227902_7064.cpp:18:38: error: 'scanf' was not declared in this scope
 int main() { while(scanf("%d%d",&n,&m),n) { for (int i=1;i<=n;i++) cin>>a[i].u>>a[i].v>>a[i].w; for (int i=1;i<=m;i++) fa[i]=i; if(n<m-1) { printf("?\n"); continue; } sort(a+1,a+1+n,cmp); int sum=0; for(int i=1;i<=n;i++) { if(check(a[i].u,a[i].v)) { sum+=a[i].w; } } int cnt=0; for (int i=1;i<=m;i++) { if(fa[i]==i) cnt++; } if(cnt==1) printf("%d\n",sum); else printf("?\n"); } return 0; }
                                      ^
0_0_38227902_7064.cpp:18:68: error: 'cin' was not declared in this scope
 int main() { while(scanf("%d%d",&n,&m),n) { for (int i=1;i<=n;i++) cin>>a[i].u>>a[i].v>>a[i].w; for (int i=1;i<=m;i++) fa[i]=i; if(n<m-1) { printf("?\n"); continue; } sort(a+1,a+1+n,cmp); int sum=0; for(int i=1;i<=n;i++) { if(check(a[i].u,a[i].v)) { sum+=a[i].w; } } int cnt=0; for (int i=1;i<=m;i++) { if(fa[i]==i) cnt++; } if(cnt==1) printf("%d\n",sum); else printf("?\n"); } return 0; }
                                                                    ^
0_0_38227902_7064.cpp:18:153: error: 'printf' was not declared in this scope
 int main() { while(scanf("%d%d",&n,&m),n) { for (int i=1;i<=n;i++) cin>>a[i].u>>a[i].v>>a[i].w; for (int i=1;i<=m;i++) fa[i]=i; if(n<m-1) { printf("?\n"); continue; } sort(a+1,a+1+n,cmp); int sum=0; for(int i=1;i<=n;i++) { if(check(a[i].u,a[i].v)) { sum+=a[i].w; } } int cnt=0; for (int i=1;i<=m;i++) { if(fa[i]==i) cnt++; } if(cnt==1) printf("%d\n",sum); else printf("?\n"); } return 0; }
                                                                                                                                                         ^
0_0_38227902_7064.cpp:18:186: error: 'sort' was not declared in this scope
 int main() { while(scanf("%d%d",&n,&m),n) { for (int i=1;i<=n;i++) cin>>a[i].u>>a[i].v>>a[i].w; for (int i=1;i<=m;i++) fa[i]=i; if(n<m-1) { printf("?\n"); continue; } sort(a+1,a+1+n,cmp); int sum=0; for(int i=1;i<=n;i++) { if(check(a[i].u,a[i].v)) { sum+=a[i].w; } } int cnt=0; for (int i=1;i<=m;i++) { if(fa[i]==i) cnt++; } if(cnt==1) printf("%d\n",sum); else printf("?\n"); } return 0; }
                                                                                                                                                                                          ^
0_0_38227902_7064.cpp:18:354: error: 'printf' was not declared in this scope
 int main() { while(scanf("%d%d",&n,&m),n) { for (int i=1;i<=n;i++) cin>>a[i].u>>a[i].v>>a[i].w; for (int i=1;i<=m;i++) fa[i]=i; if(n<m-1) { printf("?\n"); continue; } sort(a+1,a+1+n,cmp); int sum=0; for(int i=1;i<=n;i++) { if(check(a[i].u,a[i].v)) { sum+=a[i].w; } } int cnt=0; for (int i=1;i<=m;i++) { if(fa[i]==i) cnt++; } if(cnt==1) printf("%d\n",sum); else printf("?\n"); } return 0; }
                                                                                                                                                                                                                                                                                                                                                                  ^
0_0_38227902_7064.cpp:18:374: error: 'printf' was not declared in this scope
 int main() { while(scanf("%d%d",&n,&m),n) { for (int i=1;i<=n;i++) cin>>a[i].u>>a[i].v>>a[i].w; for (int i=1;i<=m;i++) fa[i]=i; if(n<m-1) { printf("?\n"); continue; } sort(a+1,a+1+n,cmp); int sum=0; for(int i=1;i<=n;i++) { if(check(a[i].u,a[i].v)) { sum+=a[i].w; } } int cnt=0; for (int i=1;i<=m;i++) { if(fa[i]==i) cnt++; } if(cnt==1) printf("%d\n",sum); else printf("?\n"); } return 0; }
                                                                                                                                                                                                                                                                                                                                                                                      ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-12-01 15:30:49, Gzip enabled