QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#353582 | #8258. Gift Exchange | hyforces | Compile Error | / | / | C++20 | 3.3kb | 2024-03-14 11:30:27 | 2024-03-14 11:30:28 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code: In function ‘int main()’: answer.code:99:26: error: no matching function for call to ‘upper_bound(int*, std::pair<int, int>*, int&, main()::<lambda(int, int)>)’ 99 | int u=upper_bound(ord+1,arr+n+1,arr[a].second,[&](int x,int y)->bool{ | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 100 | return arr[x].first<y; | ~~~~~~~~~~~~~~~~~~~~~~ 101 | })-ord-1; | ~~ In file included from /usr/include/c++/13/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51, from answer.code:1: /usr/include/c++/13/bits/stl_algo.h:2061:5: note: candidate: ‘template<class _FIter, class _Tp> constexpr _FIter std::upper_bound(_FIter, _FIter, const _Tp&)’ 2061 | upper_bound(_ForwardIterator __first, _ForwardIterator __last, | ^~~~~~~~~~~ /usr/include/c++/13/bits/stl_algo.h:2061:5: note: template argument deduction/substitution failed: answer.code:99:26: note: deduced conflicting types for parameter ‘_FIter’ (‘int*’ and ‘std::pair<int, int>*’) 99 | int u=upper_bound(ord+1,arr+n+1,arr[a].second,[&](int x,int y)->bool{ | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 100 | return arr[x].first<y; | ~~~~~~~~~~~~~~~~~~~~~~ 101 | })-ord-1; | ~~ /usr/include/c++/13/bits/stl_algo.h:2092:5: note: candidate: ‘template<class _FIter, class _Tp, class _Compare> constexpr _FIter std::upper_bound(_FIter, _FIter, const _Tp&, _Compare)’ 2092 | upper_bound(_ForwardIterator __first, _ForwardIterator __last, | ^~~~~~~~~~~ /usr/include/c++/13/bits/stl_algo.h:2092:5: note: template argument deduction/substitution failed: answer.code:99:26: note: deduced conflicting types for parameter ‘_FIter’ (‘int*’ and ‘std::pair<int, int>*’) 99 | int u=upper_bound(ord+1,arr+n+1,arr[a].second,[&](int x,int y)->bool{ | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 100 | return arr[x].first<y; | ~~~~~~~~~~~~~~~~~~~~~~ 101 | })-ord-1; | ~~