foo.cpp: In function 'void readfile()':
foo.cpp:15:5: error: reference to 'next' is ambiguous
next[i]=first[u[i]];
^
foo.cpp:6:26: note: candidates are: long long int next [200001]
long long n,first[maxnn],next[maxnn],u[maxnn],v[maxnn],w[maxnn],i,j,k,ing[maxnn],po,sum=0,maxn=0,link[maxnn];
^
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++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
from foo.cpp:1:
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:17:5: error: reference to 'next' is ambiguous
next[i+n-1]=first[u[i+n-1]];
^
foo.cpp:6:26: note: candidates are: long long int next [200001]
long long n,first[maxnn],next[maxnn],u[maxnn],v[maxnn],w[maxnn],i,j,k,ing[maxnn],po,sum=0,maxn=0,link[maxnn];
^
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++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
from foo.cpp:1:
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 slove()':
foo.cpp:59:34: error: reference to 'next' is ambiguous
for(j=first[link[i]];j!=-1;j=next[j])
^
foo.cpp:6:26: note: candidates are: long long int next [200001]
long long n,first[maxnn],next[maxnn],u[maxnn],v[maxnn],w[maxnn],i,j,k,ing[maxnn],po,sum=0,maxn=0,link[maxnn];
^
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++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
from foo.cpp:1:
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:60:11: error: reference to 'next' is ambiguous
for(k=next[j];k!=-1;k=next[k])
^
foo.cpp:6:26: note: candidates are: long long int next [200001]
long long n,first[maxnn],next[maxnn],u[maxnn],v[maxnn],w[maxnn],i,j,k,ing[maxnn],po,sum=0,maxn=0,link[maxnn];
^
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++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_iterator_base_funcs.h:184:5: note: template<clas