/in/foo.cc: In function 'void search(int, int, int)':
/in/foo.cc:55:22: error: reference to 'next' is ambiguous
else search(root,next[x],step+1);
^~~~
/in/foo.cc:4:5: note: candidates are: int next [100005]
int next[Maxn];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205: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:63:21: error: reference to 'next' is ambiguous
scanf("%d",&next[i]);
^~~~
/in/foo.cc:4:5: note: candidates are: int next [100005]
int next[Maxn];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc:64:15: error: reference to 'next' is ambiguous
add(i,next[i]);
^~~~
/in/foo.cc:4:5: note: candidates are: int next [100005]
int next[Maxn];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc:65:12: error: reference to 'next' is ambiguous
if(next[i]==i) ans[i]=1;//注意特判环为1的情况。
^~~~
/in/foo.cc:4:5: note: candidates are: int next [100005]
int next[Maxn];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc:74:32: error: reference to 'next' is ambiguous
if(ans[i]==0) search(i,next[i],1);//处理在环外的点。
^~~~
/in/foo.cc:4:5: note: candidates are: int next [100005]
int next[Maxn];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~