Problem problemsetter
User pasit
Submission Time 2026-02-07 22:23:33
Score 0
Max Time N/A
Max Memory N/A

Compile Error

problemsetter.cpp: In function ‘int32_t main()’:
problemsetter.cpp:30:61: 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>)’
30 | int x = upper_bound(arr.begin(), arr.end(), {q, 1e9}) - arr.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: