foo.cpp: In function 'int main()':
foo.cpp:20:6: error: reference to 'next' is ambiguous
in[next[i] = nextInt()]++;
^
foo.cpp:14:8: note: candidates are: int next [200005]
int n, next[NMax], in[NMax], Q[NMax], vis[NMax];
^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/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
^
foo.cpp:28:14: error: reference to 'next' is ambiguous
if (!(--in[next[x]]))
^
foo.cpp:14:8: note: candidates are: int next [200005]
int n, next[NMax], in[NMax], Q[NMax], vis[NMax];
^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/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
^
foo.cpp:29:13: error: reference to 'next' is ambiguous
Q[t++] = next[x];
^
foo.cpp:14:8: note: candidates are: int next [200005]
int n, next[NMax], in[NMax], Q[NMax], vis[NMax];
^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/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
^
foo.cpp:35:19: error: reference to 'next' is ambiguous
int l = 1, j = next[i];
^
foo.cpp:14:8: note: candidates are: int next [200005]
int n, next[NMax], in[NMax], Q[NMax], vis[NMax];
^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/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
^
foo.cpp:38:9: error: reference to 'next' is ambiguous
j = next[j];
^
foo.cpp:14:8: note: candidates are: int next [200005]
int n, next[NMax], in[NMax], Q[NMax], vis[NMax];
^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/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
^