foo.cpp: In function 'void build(int, int)':
foo.cpp:10:2: error: reference to 'next' is ambiguous
next[++tot]=first[x];
^
foo.cpp:4:27: note: candidates are: int next [400001]
int n,tot=0,first[200001],next[400001],v[400001],w[200001],ans1=0,maxn[200001],sec[200001];
^
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:3:
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:13:2: error: reference to 'next' is ambiguous
next[++tot]=first[y];
^
foo.cpp:4:27: note: candidates are: int next [400001]
int n,tot=0,first[200001],next[400001],v[400001],w[200001],ans1=0,maxn[200001],sec[200001];
^
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:3:
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: In function 'void dfs(int)':
foo.cpp:35:5: error: reference to 'next' is ambiguous
t=next[t];
^
foo.cpp:4:27: note: candidates are: int next [400001]
int n,tot=0,first[200001],next[400001],v[400001],w[200001],ans1=0,maxn[200001],sec[200001];
^
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:3:
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: In function 'void solve(int)':
foo.cpp:51:5: error: reference to 'next' is ambiguous
t=next[t];
^
foo.cpp:4:27: note: candidates are: int next [400001]
int n,tot=0,first[200001],next[400001],v[400001],w[200001],ans1=0,maxn[200001],sec[200001];
^
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:3:
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: In function 'int main()':
foo.cpp:60:9: error: reference to 'next' is ambiguous
memset(next,0,sizeof(next));
^
foo.cpp:4:27: note: candidates are: int next [400001]
int n,tot=0,first[200001],next[400001],v[400001],w[200001],ans1=0,maxn[200001],sec[200001];
^
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:3:
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:60:23: error: reference to 'next' is ambiguous
memset(next,0,si