answer.code: In function ‘void adjust()’:
answer.code:11:45: error: conversion from ‘_Rb_tree_const_iterator<long long int>’ to non-scalar type ‘_Rb_tree_const_iterator<int>’ requested
11 | multiset<int>::iterator it=(--s1.end());
| ~^~~~~~~~~~~
answer.code:14:25: error: no matching function for call to ‘std::multiset<long long int>::erase(std::multiset<int>::iterator&)’
14 | s1.erase(it);
| ~~~~~~~~^~~~
In file included from /usr/include/c++/13/set:64,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:158,
from answer.code:1:
/usr/include/c++/13/bits/stl_multiset.h:641:7: note: candidate: ‘std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::erase(const_iterator) [with _Key = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>; iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator; const_iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator]’
641 | erase(const_iterator __position)
| ^~~~~
/usr/include/c++/13/bits/stl_multiset.h:641:28: note: no known conversion for argument 1 from ‘_Rb_tree_const_iterator<int>’ to ‘_Rb_tree_const_iterator<long long int>’
641 | erase(const_iterator __position)
| ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/13/bits/stl_multiset.h:671:7: note: candidate: ‘std::multiset<_Key, _Compare, _Alloc>::size_type std::multiset<_Key, _Compare, _Alloc>::erase(const key_type&) [with _Key = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>; size_type = long unsigned int; key_type = long long int]’
671 | erase(const key_type& __x)
| ^~~~~
/usr/include/c++/13/bits/stl_multiset.h:671:29: note: no known conversion for argument 1 from ‘std::multiset<int>::iterator’ {aka ‘std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator’} to ‘const std::multiset<long long int>::key_type&’ {aka ‘const long long int&’}
671 | erase(const key_type& __x)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_multiset.h:693:7: note: candidate: ‘std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::erase(const_iterator, const_iterator) [with _Key = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>; iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator; const_iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator]’
693 | erase(const_iterator __first, const_iterator __last)
| ^~~~~
/usr/include/c++/13/bits/stl_multiset.h:693:7: note: candidate expects 2 arguments, 1 provided
answer.code:17:52: error: conversion from ‘_Rb_tree_const_iterator<long long int>’ to non-scalar type ‘_Rb_tree_const_iterator<int>’ requested
17 | multiset<int>::iterator it=s2.begin();
| ~~~~~~~~^~
answer.code:19:41: error: no matching function for call to ‘std::multiset<long long int>::erase(std::multiset<int>::iterator&)’
19 | s1.insert(*it); s2.erase(it);
| ~~~~~~~~^~~~
/usr/include/c++/13/bits/stl_multiset.h:641:7: note: candidate: ‘std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::erase(const_iterator) [with _Key = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>; iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator; const_iterator = std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator]’
641 | erase(const_iterator __position)
| ^~~~~
/usr/include/c++/13/bits/stl_multiset.h:641:28: note: no known conversion for argument 1 from ‘_Rb_tree_const_iterator<int>’ to ‘_Rb_tree_const_iterator<long long int>’
641 | erase(const_iterator __position)
| ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/13/bits/stl_multiset.h:671:7: note: candidate: ‘std::multiset<_Key, _Compare, _Alloc>::size_type std::multiset<_Key, _Compare, _Alloc>::erase(const key_type&) [with _Key = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>; size_type = long unsigned int; key_type = long long i...