Problem bucketstacking
User oolimry
Submission Time 2025-06-08 15:13:34
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bucketstacking.cpp: In function ‘int main()’:
bucketstacking.cpp:51:19: error: no matching function for call to ‘std::multiset<long long int>::find(std::_Rb_tree_const_iterator<long long int>&)’
51 | m.erase(m.find(p));
| ^
In file included from /usr/include/c++/9/set:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:87,
from bucketstacking.cpp:2:
/usr/include/c++/9/bits/stl_multiset.h:775:7: note: candidate: ‘std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::find(const key_type&) [with _Key = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>; std::multiset<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<long long int>; std::multiset<_Key, _Compare, _Alloc>::key_type = long long int]’
775 | find(const key_type& __x)
| ^~~~