/in/foo.cc: In function 'void addedge(int, int)':
/in/foo.cc:28:2: error: reference to 'next' is ambiguous
next[++t]=first[s];
^~~~
/in/foo.cc:21:14: note: candidates are: int next [40005]
int first[N],next[M],to[M],from[M],t;
^~~~
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:3:
/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 tarjan(int)':
/in/foo.cc:45:33: error: reference to 'next' is ambiguous
for(int i=first[x],v=to[i];i;i=next[i],v=to[i])
^~~~
/in/foo.cc:21:14: note: candidates are: int next [40005]
int first[N],next[M],to[M],from[M],t;
^~~~
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:3:
/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
^~~~