foo.cpp: In function 'void add(int, int, int)':
foo.cpp:11:2: error: reference to 'next' is ambiguous
next[ec]=fst[u];
^
foo.cpp:6:15: note: candidates are: int next [600010]
int fst[MAXN],next[MAXN<<1],len[MAXN<<1],to[MAXN<<1],ec=0;
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\istream:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\sstream:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\complex:45,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ccomplex:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\mingw32\bits\stdc++.h:52,
from foo.cpp:2:
c:\mingw\lib\gcc\mingw32\4.8.1\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()':
foo.cpp:39:6: error: reference to 'next' is ambiguous
e=next[e];
^
foo.cpp:6:15: note: candidates are: int next [600010]
int fst[MAXN],next[MAXN<<1],len[MAXN<<1],to[MAXN<<1],ec=0;
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\istream:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\sstream:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\complex:45,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ccomplex:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\mingw32\bits\stdc++.h:52,
from foo.cpp:2:
c:\mingw\lib\gcc\mingw32\4.8.1\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:34: error: reference to 'next' is ambiguous
for(register int i=fst[u];i;i=next[i])
^
foo.cpp:6:15: note: candidates are: int next [600010]
int fst[MAXN],next[MAXN<<1],len[MAXN<<1],to[MAXN<<1],ec=0;
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\istream:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\sstream:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\complex:45,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ccomplex:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\mingw32\bits\stdc++.h:52,
from foo.cpp:2:
c:\mingw\lib\gcc\mingw32\4.8.1\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:88:11: error: reference to 'next' is ambiguous
cur[u]=next[cur[u]];
^
foo.cpp:6:15: note: candidates are: int next [600010]
int fst[MAXN],next[MAXN<<1],len[MAXN<<1],to[MAXN<<1],ec=0;
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
from c:\mingw\lib\gcc\mingw32\