Problem problemsetter
User Vinayak01
Submission Time 2025-03-03 13:28:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

problemsetter.cpp: In function ‘int main()’:
problemsetter.cpp:29:62: error: no matching function for call to ‘upper_bound(std::vector<std::pair<int, int> >::iterator, std::vector<std::pair<int, int> >::iterator, <brace-enclosed initializer list>)’
29 | int idx = upper_bound(contest.begin(),contest.end(),{q,1e9}) - contest.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 problemsetter.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:<