Problem medianheap
User back2square1
Submission Time 2023-02-05 16:03:24
Score 0
Max Time N/A
Max Memory N/A

Compile Error

medianheap.cpp: In function ‘int main()’:
medianheap.cpp:13:17: error: invalid use of member function ‘std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’ (did you forget the ‘()’ ?)
13 | int mid = (v.size+1)/2;
| ~~^~~~
| ()
medianheap.cpp:14:19: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator+’
14 | v.erase(v.begin+mid-1);
| ~~~~~~~^~~~
| | |
| | int
| <unresolved overloaded function type>