/in/foo.cc: In function 'void go(int)':
/in/foo.cc:20:5: error: reference to 'next' is ambiguous
i=next[i];
^~~~
/in/foo.cc:4:23: note: candidates are: int next [10000]
int n,m,k,s,ks[10000],next[10000],e[10000],a[10000];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208: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:36:3: error: reference to 'next' is ambiguous
next[i]=ks[x]; ks[x]=i; e[i]=y;
^~~~
/in/foo.cc:4:23: note: candidates are: int next [10000]
int n,m,k,s,ks[10000],next[10000],e[10000],a[10000];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc:37:3: error: reference to 'next' is ambiguous
next[i+m]=ks[y]; ks[y]=i+m; e[i+m]=x;
^~~~
/in/foo.cc:4:23: note: candidates are: int next [10000]
int n,m,k,s,ks[10000],next[10000],e[10000],a[10000];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~