foo.cpp: In function 'void build(int, int)':
foo.cpp:9:2: error: reference to 'next' is ambiguous
next[++tot]=first[x];
^
foo.cpp:4:27: note: candidates are: int next [200001]
int n,tot=0,first[200001],next[200001],v[200001],sum[200001],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:12:2: error: reference to 'next' is ambiguous
next[++tot]=first[y];
^
foo.cpp:4:27: note: candidates are: int next [200001]
int n,tot=0,first[200001],next[200001],v[200001],sum[200001],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:32:5: error: reference to 'next' is ambiguous
t=next[t];
^
foo.cpp:4:27: note: candidates are: int next [200001]
int n,tot=0,first[200001],next[200001],v[200001],sum[200001],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:46:5: error: reference to 'next' is ambiguous
t=next[t];
^
foo.cpp:4:27: note: candidates are: int next [200001]
int n,tot=0,first[200001],next[200001],v[200001],sum[200001],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:53:9: error: reference to 'next' is ambiguous
memset(next,0,sizeof(next));
^
foo.cpp:4:27: note: candidates are: int next [200001]
int n,tot=0,first[200001],next[200001],v[200001],sum[200001],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:53:23: