Problem airplane2
User lucas
Submission Time 2026-02-28 15:15:12
Score 0
Max Time N/A
Max Memory N/A

Compile Error

airplane2.cpp: In function ‘int main()’:
airplane2.cpp:39:36: error: no match for ‘operator-’ (operand types are ‘std::map<long long int, long long int>::iterator’ {aka ‘std::_Rb_tree_iterator<std::pair<const long long int, long long int> >’} and ‘std::map<long long int, long long int>::iterator’ {aka ‘std::_Rb_tree_iterator<std::pair<const long long int, long long int> >’})
39 | int lb = c2.lower_bound(x) - c2.begin();
| ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
| | |
| | _Rb_tree_iterator<[...]>
| _Rb_tree_iterator<[...]>
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++/