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_39402152_11264.c:2:1: error: unknown type name 'using'
    2 | using namespace std;
      | ^~~~~
0_0_39402152_11264.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    2 | using namespace std;
      |                 ^~~
0_0_39402152_11264.c:6:5: error: expected specifier-qualifier-list before 'Edge'
    6 |     Edge(){}
      |     ^~~~
0_0_39402152_11264.c: In function 'find':
0_0_39402152_11264.c:21:30: error: lvalue required as left operand of assignment
   21 |     return par[x]==x?x:par[x]=find(par[x]);
      |                              ^
0_0_39402152_11264.c: In function 'join':
0_0_39402152_11264.c:30:16: error: 'true' undeclared (first use in this function)
   30 |         return true;
      |                ^~~~
0_0_39402152_11264.c:2:1: note: 'true' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | using namespace std;
0_0_39402152_11264.c:30:16: note: each undeclared identifier is reported only once for each function it appears in
   30 |         return true;
      |                ^~~~
0_0_39402152_11264.c:32:12: error: 'false' undeclared (first use in this function)
   32 |     return false;
      |            ^~~~~
0_0_39402152_11264.c:32:12: note: 'false' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
0_0_39402152_11264.c: At top level:
0_0_39402152_11264.c:34:1: error: unknown type name 'bool'
   34 | bool cmp(Edge x,Edge y)
      | ^~~~
0_0_39402152_11264.c:34:1: note: 'bool' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
0_0_39402152_11264.c:34:10: error: unknown type name 'Edge'
   34 | bool cmp(Edge x,Edge y)
      |          ^~~~
0_0_39402152_11264.c:34:17: error: unknown type name 'Edge'
   34 | bool cmp(Edge x,Edge y)
      |                 ^~~~
0_0_39402152_11264.c: In function 'main':
0_0_39402152_11264.c:57:32: error: incompatible types when assigning to type 'struct Edge' from type 'int'
   57 |                 else    e[n++]=Edge(i,j,d);
      |                                ^~~~
0_0_39402152_11264.c:60:20: error: 'cmp' undeclared (first use in this function)
   60 |         sort(e,e+n,cmp);
      |                    ^~~


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-11-25 22:19:19, Gzip enabled