Problem | medianheap |
---|---|
User | Hengweezy |
Submission Time | 2025-01-24 20:22:51 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
medianheap.cpp: In function ‘int main()’:
medianheap.cpp:22:23: error: no match for ‘operator+’ (operand types are ‘std::set<int>::iterator’ {aka ‘std::_Rb_tree_const_iterator<int>’} and ‘std::set<int>::size_type’ {aka ‘long unsigned int’})
22 | s.erase(s.begin() + s.size()/ 2 - 1);
| ~~~~~~~~~ ^ ~~~~~~~~~~~
| | |
| | std::set<int>::size_type {aka long unsigned int}
| std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
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.h:423:5: note: candidate: ‘template<c