Problem medianheap
User PlayVoltz
Submission Time 2023-05-19 22:27:44
Score 0
Max Time N/A
Max Memory N/A

Compile Error

medianheap.cpp: In function ‘int main()’:
medianheap.cpp:13:44: error: no matching function for call to ‘advance(std::multiset<int>::iterator, std::multiset<int>::size_type)’
13 | advance(vect.begin(), (vect.size()-1)/2);
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:66,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from medianheap.cpp:1:
/usr/include/c++/9/bits/stl_iterator_base_funcs.h:202:5: note: candidate: ‘constexpr void std::advance(_InputIterator&, _Distance) [with _InputIterator = std::_Rb_tree_const_iterator<int>; _Distance = long unsigned int]’ <near match>
202 | advance(_InputIterator& __i, _Distance __n)
| ^~~~~~~
/usr/include/c++/9/bits/stl_iterator_base_funcs.h:202: