Problem | arrayfind |
---|---|
User | Yizhou |
Submission Time | 2024-06-02 13:14:41 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
arrayfind.cpp: In function ‘int main()’:
arrayfind.cpp:20:27: error: cannot convert ‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >’ to ‘int’ in initialization
20 | int smallest=lower_bound(nums.begin(),nums.end(),no);
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| __gnu_cxx::__normal_iterator<int*, std::vector<int> >
arrayfind.cpp:21:16: error: no match for ‘operator-’ (operand types are ‘int’ and ‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >’)
21 | int biggest=l-upper_bound(nums.begin(),nums.end(),no);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| 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++/