foo.cc: In function 'void add(int, int)':
foo.cc:16:15: error: reference to 'next' is ambiguous
16 | ver[++cut]=y;next[cut]=head[x];head[x]=cut;
| ^~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:66,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
213 | next(_InputIterator __x, typename
| ^~~~
foo.cc:10:26: note: 'int next [200020]'
10 | int cut,head[N],ver[2*N],next[2*N];
| ^~~~
foo.cc: In function 'void dfs1(int, int)':
foo.cc:24:24: error: reference to 'next' is ambiguous
24 | for(int i=head[x];i;i=next[i]){
| ^~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:66,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
213 | next(_InputIterator __x, typename
| ^~~~
foo.cc:10:26: note: 'int next [200020]'
10 | int cut,head[N],ver[2*N],next[2*N];
| ^~~~
foo.cc: In function 'void dfs2(int, int)':
foo.cc:36:24: error: reference to 'next' is ambiguous
36 | for(int i=head[x];i;i=next[i]){
| ^~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:66,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
213 | next(_InputIterator __x, typename
| ^~~~
foo.cc:10:26: note: 'int next [200020]'
10 | int cut,head[N],ver[2*N],next[2*N];
| ^~~~
foo.cc: In function 'void dfs_k(int, int)':
foo.cc:47:24: error: reference to 'next' is ambiguous
47 | for(int i=head[x];i;i=next[i]){
| ^~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:66,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
213 | next(_InputIterator __x, typename
| ^~~~
foo.cc:10:26: note: 'int next [200020]'
10 | int cut,head[N],ver[2*N],next[2*N];
| ^~~~
foo.cc: In function 'int main()':
foo.cc:56:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
56 | scanf("%d%d",&n,&k);
| ~~~~~^~~~~~~~~~~~~~
foo.cc:59:11: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
59 | scanf("%d%d",&x,&y);
| ~~~~~^~~~~~~~~~~~~~
Found 20 testcases.
[Hydro](https://hydro.ac)提供评测服务