answer.code: In function ‘void dfs(int)’:
answer.code:134:21: error: no matching function for call to ‘swap(node&, node)’
134 | swap(val[v], node(a[v]));
| ~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_pair.h:59,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/vector:60,
from answer.code:1:
/usr/include/c++/11/bits/move.h:196:5: note: candidate: ‘std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = node; std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > = void]’ (near match)
196 | swap(_Tp& __a, _Tp& __b)
| ^~~~
/usr/include/c++/11/bits/move.h:196:5: note: conversion of argument 2 would be ill-formed:
answer.code:134:30: error: cannot bind non-const lvalue reference of type ‘node&’ to an rvalue of type ‘node’
134 | swap(val[v], node(a[v]));
| ^~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_pair.h:59,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/vector:60,
from answer.code:1:
/usr/include/c++/11/bits/move.h:220:5: note: candidate: ‘template<class _Tp, long unsigned int _Nm> std::__enable_if_t<std::__is_swappable<_Tp>::value> std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm])’
220 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^~~~
/usr/include/c++/11/bits/move.h:220:5: note: template argument deduction/substitution failed:
answer.code:134:21: note: mismatched types ‘_Tp [_Nm]’ and ‘node’
134 | swap(val[v], node(a[v]));
| ~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/vector:60,
from answer.code:1:
/usr/include/c++/11/bits/stl_pair.h:533:5: note: candidate: ‘template<class _T1, class _T2> void std::swap(std::pair<_T1, _T2>&, std::pair<_T1, _T2>&)’
533 | swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:533:5: note: template argument deduction/substitution failed:
answer.code:134:21: note: ‘node’ is not derived from ‘std::pair<_T1, _T2>’
134 | swap(val[v], node(a[v]));
| ~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/vector:67,
from answer.code:1:
/usr/include/c++/11/bits/stl_vector.h:1962:5: note: candidate: ‘template<class _Tp, class _Alloc> void std::swap(std::vector<_Tp, _Alloc>&, std::vector<_Tp, _Alloc>&)’
1962 | swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y)
| ^~~~
/usr/include/c++/11/bits/stl_vector.h:1962:5: note: template argument deduction/substitution failed:
answer.code:134:21: note: ‘node’ is not derived from ‘std::vector<_Tp, _Alloc>’
134 | swap(val[v], node(a[v]));
| ~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from answer.code:2:
/usr/include/c++/11/bits/basic_string.h:6493:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> void std::swap(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)’
6493 | swap(basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~
/usr/include/c++/11/bits/basic_string.h:6493:5: note: template argument deduction/substitution failed:
answer.code:134:21: note: ‘node’ is not derived from ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
134 | swap(val[v], node(a[v]));
| ~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/vector:68,
from answer.code:1:
/usr/include/c++/11/bits/stl_bvector.h:118:3: note: candidate: ‘void std::swap(std::_Bit_reference, std::_Bit_reference)’
118 | swap(_Bit_reference __x, _Bit_reference __y) noexcept
| ^~~~
/usr/include/c++/11/bits/stl_bvector.h:118:23: note: no known conversion for argument 1 from ‘node’ to ‘std::_Bit_reference’
118 | swap(_Bit_reference __x, _Bit_reference __y) noexcept
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/11/bits/stl_bvector.h:126:3: note: candidate: ‘void std::swap(std::_Bit_reference, bool&)’
126 | swap(_Bit_reference __x, bool& __y) noexcept
| ^~~~
/usr/include/c++/11/bits/stl_bvector.h:126:23: note: no known conversion for argument 1 from ‘node’ to ‘std::_B...