/in/foo.cc: In function 'int main()':
/in/foo.cc:19:12: error: reference to 'next' is ambiguous
memset(next,-1,sizeof(next));
^~~~
/in/foo.cc:6:28: note: candidates are: int next [200000]
int vis[maxn],tmpans[maxn],next[maxn],q[maxn*10],a[maxn],num[maxn];
^~~~
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:19:27: error: reference to 'next' is ambiguous
memset(next,-1,sizeof(next));
^~~~
/in/foo.cc:6:28: note: candidates are: int next [200000]
int vis[maxn],tmpans[maxn],next[maxn],q[maxn*10],a[maxn],num[maxn];
^~~~
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:25:13: error: reference to 'next' is ambiguous
next[rear]=-1;
^~~~
/in/foo.cc:6:28: note: candidates are: int next [200000]
int vis[maxn],tmpans[maxn],next[maxn],q[maxn*10],a[maxn],num[maxn];
^~~~
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:40:17: error: reference to 'next' is ambiguous
next[rear]=head;
^~~~
/in/foo.cc:6:28: note: candidates are: int next [200000]
int vis[maxn],tmpans[maxn],next[maxn],q[maxn*10],a[maxn],num[maxn];
^~~~
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:49:13: error: reference to 'next' is ambiguous
ans=next[ans];
^~~~
/in/foo.cc:6:28: note: candidates are: int next [200000]
int vis[maxn],tmpans[maxn],next[maxn],q[maxn*10],a[maxn],num[maxn];
^~~~
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
^~~~