Problem | arrayfind |
---|---|
User | meowmeow |
Submission Time | 2023-06-12 20:53:38 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
arrayfind.cpp: In function ‘int main()’:
arrayfind.cpp:19:50: error: no match for ‘operator-’ (operand types are ‘int’ and ‘std::vector<int>::iterator’ {aka ‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >’})
19 | int low = *lower_bound(arr.begin(),arr.end(),x)- arr.begin();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ~~~~~~~~~~~
| | |
| int std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}
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,
from arrayfind.cpp:1:
/usr/include/c++/9/bi