/ Vijos /

记录详情

Compile Error

foo.cc:82:11: error: redefinition of 'const int MAXN'
   82 | const int MAXN = 100001,MAXM=200001;
      |           ^~~~
foo.cc:10:11: note: 'const int MAXN' previously defined here
   10 | const int MAXN=100001;
      |           ^~~~
foo.cc:82:25: error: redefinition of 'const int MAXM'
   82 | const int MAXN = 100001,MAXM=200001;
      |                         ^~~~
foo.cc:11:11: note: 'const int MAXM' previously defined here
   11 | const int MAXM=200001;
      |           ^~~~
foo.cc:83:5: error: redefinition of 'int n'
   83 | int n, m, cnt;//n个点,m条边
      |     ^
foo.cc:12:5: note: 'int n' previously declared here
   12 | int n, m, cnt;//n个点,m条边
      |     ^
foo.cc:83:8: error: redefinition of 'int m'
   83 | int n, m, cnt;//n个点,m条边
      |        ^
foo.cc:12:8: note: 'int m' previously declared here
   12 | int n, m, cnt;//n个点,m条边
      |        ^
foo.cc:83:11: error: redefinition of 'int cnt'
   83 | int n, m, cnt;//n个点,m条边
      |           ^~~
foo.cc:12:11: note: 'int cnt' previously declared here
   12 | int n, m, cnt;//n个点,m条边
      |           ^~~
foo.cc:84:5: error: redefinition of 'int head [100001]'
   84 | int head[MAXN];
      |     ^~~~
foo.cc:13:5: note: 'int head [100001]' previously declared here
   13 | int head[MAXN];
      |     ^~~~
foo.cc:85:5: error: redefinition of 'int depth [100001]'
   85 | int depth[MAXN],ind[MAXN];//节点在拓扑序中的深度、节点入度
      |     ^~~~~
foo.cc:14:5: note: 'int depth [100001]' previously declared here
   14 | int depth[MAXN],ind[MAXN];//节点在拓扑序中的深度、节点入度
      |     ^~~~~
foo.cc:85:17: error: redefinition of 'int ind [100001]'
   85 | int depth[MAXN],ind[MAXN];//节点在拓扑序中的深度、节点入度
      |                 ^~~
foo.cc:14:17: note: 'int ind [100001]' previously declared here
   14 | int depth[MAXN],ind[MAXN];//节点在拓扑序中的深度、节点入度
      |                 ^~~
foo.cc:87:8: error: redefinition of 'struct Edge'
   87 | struct Edge
      |        ^~~~
foo.cc:16:8: note: previous definition of 'struct Edge'
   16 | struct Edge
      |        ^~~~
foo.cc:90:2: error: conflicting declaration 'int edge [200001]'
   90 | }edge[MAXM];
      |  ^~~~
foo.cc:19:2: note: previous declaration as 'Edge edge [200001]'
   19 | }edge[MAXM];
      |  ^~~~
foo.cc:92:6: error: redefinition of 'void add_edge(int, int)'
   92 | void add_edge(int u, int v)
      |      ^~~~~~~~
foo.cc:21:6: note: 'void add_edge(int, int)' previously defined here
   21 | void add_edge(int u, int v)
      |      ^~~~~~~~
foo.cc:99:6: error: redefinition of 'void topo()'
   99 | void topo()
      |      ^~~~
foo.cc:28:6: note: 'void topo()' previously defined here
   28 | void topo()
      |      ^~~~
foo.cc:125:5: error: redefinition of 'int main()'
  125 | int main()
      |     ^~~~
foo.cc:54:5: note: 'int main()' previously defined here
   54 | int main()
      |     ^~~~
foo.cc: In function 'int main()':
foo.cc:57:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   57 |     scanf("%d%d",&n,&m);
      |     ~~~~~^~~~~~~~~~~~~~
foo.cc:60:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   60 |         scanf("%d%d",&u,&v);
      |         ~~~~~^~~~~~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:128:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  128 |     scanf("%d%d",&n,&m);
      |     ~~~~~^~~~~~~~~~~~~~
foo.cc:131:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  131 |         scanf("%d%d",&u,&v);
      |         ~~~~~^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1790 拓扑编号
语言
C++
递交时间
2022-08-05 21:59:00
评测时间
2022-08-05 21:59:00
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes