Problem arrayfind
User jxlau
Submission Time 2024-04-05 15:24:59
Score 0
Max Time N/A
Max Memory N/A

Compile Error

arrayfind.cpp: In function ‘int32_t main()’:
arrayfind.cpp:24:33: error: no match for ‘operator-’ (operand types are ‘std::multiset<long long int>::iterator’ {aka ‘std::_Rb_tree_const_iterator<long long int>’} and ‘std::multiset<long long int>::iterator’ {aka ‘std::_Rb_tree_const_iterator<long long int>’})
24 | int lb = nums.lower_bound(q) - nums.begin();
| ~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~
| | |
| | _Rb_tree_const_iterator<[...]>
| _Rb_tree_const_iterator<[...]>
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
fro