Problem | arrayfind |
---|---|
User | hwy |
Submission Time | 2023-06-05 21:57:39 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
arrayfind.cpp: In function ‘int main()’:
arrayfind.cpp:20:22: error: cannot convert ‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >’ to ‘int’ in assignment
20 | lower = lower_bound(lst.begin(), lst.end(), q);
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| __gnu_cxx::__normal_iterator<int*, std::vector<int> >
arrayfind.cpp:21:13: error: no match for ‘operator-’ (operand types are ‘int’ and ‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >’)
21 | upper = N - upper_bound(lst.begin(), lst.end(), q);
| ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| int __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/specfun.h:45,