/in/foo.cc: In function 'void add(int, int)':
/in/foo.cc:13:2: error: reference to 'next' is ambiguous
next[ce]=head[x];
^~~~
/in/foo.cc:8:19: note: candidates are: int next [2200000]
int n,no,to[N<<1],next[N<<1],head[N],ce;
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/algorithm:61,
from /in/foo.cc:4:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc: In function 'void dfs1(int, int)':
/in/foo.cc:20:20: error: reference to 'next' is ambiguous
for(i=head[x];i;i=next[i])
^~~~
/in/foo.cc:8:19: note: candidates are: int next [2200000]
int n,no,to[N<<1],next[N<<1],head[N],ce;
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/algorithm:61,
from /in/foo.cc:4:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc: In function 'void dfs2(int, int)':
/in/foo.cc:42:20: error: reference to 'next' is ambiguous
for(i=head[x];i;i=next[i])
^~~~
/in/foo.cc:8:19: note: candidates are: int next [2200000]
int n,no,to[N<<1],next[N<<1],head[N],ce;
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/algorithm:61,
from /in/foo.cc:4:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:52:6: warning: unused variable 'm' [-Wunused-variable]
int m,i,j,k,x,y;
^
/in/foo.cc:52:10: warning: unused variable 'j' [-Wunused-variable]
int m,i,j,k,x,y;
^
/in/foo.cc:52:12: warning: unused variable 'k' [-Wunused-variable]
int m,i,j,k,x,y;
^