answer.code:40:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
40 | main()
| ^~~~
In file included from /usr/include/c++/13/string:49,
from /usr/include/c++/13/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52,
from answer.code:1:
/usr/include/c++/13/bits/stl_function.h: In instantiation of ‘constexpr bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = node]’:
/usr/include/c++/13/bits/stl_tree.h:2149:32: required from ‘std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_equal_pos(const key_type&) [with _Key = node; _Val = node; _KeyOfValue = std::_Identity<node>; _Compare = std::less<node>; _Alloc = std::allocator<node>; key_type = node]’
/usr/include/c++/13/bits/stl_tree.h:2198:4: required from ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_equal(_Arg&&) [with _Arg = node; _Key = node; _Val = node; _KeyOfValue = std::_Identity<node>; _Compare = std::less<node>; _Alloc = std::allocator<node>; iterator = std::_Rb_tree<node, node, std::_Identity<node>, std::less<node>, std::allocator<node> >::iterator]’
/usr/include/c++/13/bits/stl_multiset.h:510:36: required from ‘std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::insert(value_type&&) [with _Key = node; _Compare = std::less<node>; _Alloc = std::allocator<node>; iterator = std::_Rb_tree<node, node, std::_Identity<node>, std::less<node>, std::allocator<node> >::const_iterator; value_type = node]’
answer.code:52:46: required from here
/usr/include/c++/13/bits/stl_function.h:408:20: error: no match for ‘operator<’ (operand types are ‘const node’ and ‘const node’)
408 | { return __x < __y; }
| ~~~~^~~~~
answer.code:13:10: note: candidate: ‘bool node::operator<(node)’ (near match)
13 | bool operator<(node b)
| ^~~~~~~~
answer.code:13:10: note: passing ‘const node*’ as ‘this’ argument discards qualifiers
In file included from /usr/include/c++/13/bits/stl_algobase.h:64,
from /usr/include/c++/13/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51:
/usr/include/c++/13/bits/stl_pair.h:835:5: note: candidate: ‘template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)’
835 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/13/bits/stl_pair.h:835:5: note: template argument deduction/substitution failed:
/usr/include/c++/13/bits/stl_function.h:408:20: note: ‘const node’ is not derived from ‘const std::pair<_T1, _T2>’
408 | { return __x < __y; }
| ~~~~^~~~~
In file included from /usr/include/c++/13/bits/stl_algobase.h:67:
/usr/include/c++/13/bits/stl_iterator.h:455:5: note: candidate: ‘template<class _Iterator> bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)’
455 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:455:5: note: template argument deduction/substitution failed:
/usr/include/c++/13/bits/stl_function.h:408:20: note: ‘const node’ is not derived from ‘const std::reverse_iterator<_Iterator>’
408 | { return __x < __y; }
| ~~~~^~~~~
/usr/include/c++/13/bits/stl_iterator.h:500:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)’
500 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:500:5: note: template argument deduction/substitution failed:
/usr/include/c++/13/bits/stl_function.h:408:20: note: ‘const node’ is not derived from ‘const std::reverse_iterator<_Iterator>’
408 | { return __x < __y; }
| ~~~~^~~~~
/usr/include/c++/13/bits/stl_iterator.h:1705:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)’
1705 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:1705:5: note: template argument deduction/substitution failed:
/usr/include/c++/13/bits/stl_function.h:408:20: note: ‘const node’ is not derived from ‘const std::move_iterator<_IteratorL>’
408 | { return __x < __y; }
| ~~~~^~~~~
/usr/include/c++/13/bits/stl_iterator.h:1770:5: note: candidate: ‘template<class _Iterator> bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)’
1770 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
...