Problem medianheap
User YSH2020
Submission Time 2023-06-09 14:23:02
Score 0
Max Time N/A
Max Memory N/A

Compile Error

medianheap.cpp: In function ‘int main()’:
medianheap.cpp:13:40: error: no matching function for call to ‘std::deque<int>::erase(std::deque<int>::size_type)’
13 | heap.erase((size(heap)-1)/2);
| ^
In file included from /usr/include/c++/9/deque:67,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:68,
from medianheap.cpp:1:
/usr/include/c++/9/bits/stl_deque.h:1807:7: note: candidate: ‘std::deque<_Tp, _Alloc>::iterator std::deque<_Tp, _Alloc>::erase(std::deque<_Tp, _Alloc>::const_iterator) [with _Tp = int; _Alloc = std::allocator<int>; std::deque<_Tp, _Alloc>::iterator = std::_Deque_iterator<int, int&, int*>; std::deque<_Tp, _Alloc>::const_iterator = std::_Deque_iterator<int, const int&, const int*>]’
1807 | erase(const_iterator __position)
| ^~~~~
/usr/include/c++/9/bits/stl_deque.h: