Problem | moneychanger |
---|---|
User | hwy |
Submission Time | 2023-06-07 18:18:01 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
moneychanger.cpp: In function ‘int main()’:
moneychanger.cpp:18:26: error: no matching function for call to ‘upper_bound(std::vector<int>&)’
18 | pos = upper_bound(coins) - coins.begin() - 1;
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from moneychanger.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:2082:5: note: candidate: ‘template<class _FIter, class _Tp> _FIter std::upper_bound(_FIter, _FIter, const _Tp&)’
2082 | upper_bound(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~
/usr/include/c++/9/bits/stl_algo.h:2082:5: note: template argument deduction/substitution failed:
moneychanger.cpp:18:26: note: candidate expects 3 arguments, 1 provided
18 | pos = upper_bound(coins) - coins.begin() - 1;
| ^
In file included from /usr/in