/in/foo.cc: In function 'void dfs(int)':
/in/foo.cc:50:23: error: reference to 'next' is ambiguous
for(i=head[x];i;i=next[i])
^~~~
/in/foo.cc:8:35: note: candidates are: int next [300010]
int ch[maxn][2],nvl[maxn],k[maxn],next[maxn]; //nvl记录左偏树中的深度
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc:3:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:73:40: error: reference to 'next' is ambiguous
scanf("%d%d%lld",&a,&k[i],&v[i]),next[i]=head[a],head[a]=i;
^~~~
/in/foo.cc:8:35: note: candidates are: int next [300010]
int ch[maxn][2],nvl[maxn],k[maxn],next[maxn]; //nvl记录左偏树中的深度
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc:3:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~