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_22082020_14399.cpp: In function 'void dfs(int)':
0_0_22082020_14399.cpp:33:2: error: 'vis' was not declared in this scope
  vis[x]=1;
  ^
0_0_22082020_14399.cpp:35:23: error: reference to 'next' is ambiguous
  for (i=head[x]; i; i=next[i]){
                       ^
0_0_22082020_14399.cpp:13:14: note: candidates are: int next [20020]
 int ver[N*2],next[N*2],head[N],tot,n,m,a[N],b[N],cnt,d[N],f[N][22]; 
              ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:61,
                 from 0_0_22082020_14399.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_22082020_14399.cpp: In function 'int get_lca(int, int)':
0_0_22082020_14399.cpp:50:12: error: 'depth' was not declared in this scope
     int dc=depth[x]-depth[y];
            ^
0_0_22082020_14399.cpp:52:17: error: 'M' was not declared in this scope
     for (i=0;i<=M;i++)
                 ^
0_0_22082020_14399.cpp: In function 'int main()':
0_0_22082020_14399.cpp:103:6: error: expected primary-expression before ';' token
    x+; y++;
      ^
0_0_22082020_14399.cpp:104:11: error: 'add' was not declared in this scope
    add(x,y);
           ^
0_0_22082020_14399.cpp:107:10: error: 'vis' was not declared in this scope
   memset(vis,0,sizeof(vis));
          ^
0_0_22082020_14399.cpp:113:17: error: 'M' was not declared in this scope
    for (j=1; j<=M; j++){
                 ^


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-07-04 14:11:42, Gzip enabled