foo.cpp: In function 'void insert(int, int)':
foo.cpp:13:13: error: reference to 'next' is ambiguous
v[++ne]=bb;next[ne]=head[aa];head[aa]=ne;
^
foo.cpp:9:13: note: candidates are: int next [5000]
int head[N],next[M],v[M],w[N],f[N][2];
^
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++/bits/char_traits.h:39,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ios:40,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ostream:38,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:39,
from foo.cpp:1:
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:36:24: error: reference to 'next' is ambiguous
for(int i=head[k];i;i=next[i])
^
foo.cpp:9:13: note: candidates are: int next [5000]
int head[N],next[M],v[M],w[N],f[N][2];
^
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++/bits/char_traits.h:39,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ios:40,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ostream:38,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:39,
from foo.cpp:1:
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:43:24: error: reference to 'next' is ambiguous
for(int i=head[k];i;i=next[i])
^
foo.cpp:9:13: note: candidates are: int next [5000]
int head[N],next[M],v[M],w[N],f[N][2];
^
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++/bits/char_traits.h:39,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ios:40,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ostream:38,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:39,
from foo.cpp:1:
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()':
foo.cpp:55:33: warning: too many arguments for format [-Wformat-extra-args]
printf("%d\n",f[RT][0],f[RT][1]);
^