Problem medianheap
User YSH2020
Submission Time 2023-07-16 09:33:43
Score 0
Max Time N/A
Max Memory N/A

Compile Error

medianheap.cpp: In function ‘int main()’:
medianheap.cpp:14:74: error: no matching function for call to ‘std::deque<int>::insert(std::_Deque_iterator<int, int&, int*>::difference_type, int&)’
14 | heap.insert(lower_bound(heap.begin(), heap.end(), la)-heap.begin(), la);
| ^
In file included from /usr/include/c++/9/deque:69,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:68,
from medianheap.cpp:1:
/usr/include/c++/9/bits/deque.tcc:208:5: note: candidate: ‘std::deque<_Tp, _Alloc>::iterator std::deque<_Tp, _Alloc>::insert(std::deque<_Tp, _Alloc>::const_iterator, const value_type&) [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