foo.cpp: In function 'int main()':
foo.cpp:17:16: error: reference to 'next' is ambiguous
memset(next,-1,sizeof(next));
^
foo.cpp:6:5: note: candidates are: int next [3005]
int next[3005],a[10005],b[10005],m,i,n;
^
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:4:
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:17:31: error: reference to 'next' is ambiguous
memset(next,-1,sizeof(next));
^
foo.cpp:6:5: note: candidates are: int next [3005]
int next[3005],a[10005],b[10005],m,i,n;
^
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:4:
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:21:18: error: reference to 'next' is ambiguous
if ((next[a[j]]!=-1)&&(next[a[j]]!=a[j+1])){
^
foo.cpp:6:5: note: candidates are: int next [3005]
int next[3005],a[10005],b[10005],m,i,n;
^
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:4:
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:21:36: error: reference to 'next' is ambiguous
if ((next[a[j]]!=-1)&&(next[a[j]]!=a[j+1])){
^
foo.cpp:6:5: note: candidates are: int next [3005]
int next[3005],a[10005],b[10005],m,i,n;
^
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:4:
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:25:13: error: reference to 'next' is ambiguous
next[a[j]]=a[j+1];
^
foo.cpp:6:5: note: candidates are: int next [3005]
int next[3005],a[10005],b[10005],m,i,n;
^
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:4:
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:27:26: error: reference to 'next' is ambiguous
int t=a[m],nextt=next[a[m]],ans=0;
^
foo.cpp:6:5: note: candidates are: int next [3005]
int next[3005],a[10005],b[10005],m,i,n;
^
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/g