closing.cpp: In function 'int max_score(int, int, int, ll, std::vector<int>, std::vector<int>, std::vector<int>)':
closing.cpp:40:89: error: no matching function for call to 'upper_bound(std::vector<std::tuple<long long int, int, int> >::iterator, std::vector<std::tuple<long long int, int, int> >::iterator, <brace-enclosed initializer list>)'
40 | ans = max(ans, ry - ly + 1 + b[upper_bound(a.begin(), a.end(), {K - s, N, N}) - a.begin() - 1]);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from closing.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:2087:5: note: candidate: 'template<class _FIter, class _Tp> _FIter std::upper_bound(_FIter, _FIter, const _Tp&)'
2087 | upper_bound(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_algo.h:2087:5: note: template argument deduction/substitution failed:
closing.cpp:40:89: note: couldn't deduce template parameter '_Tp'
40 | ans = max(ans, ry - ly + 1 + b[upper_bound(a.begin(), a.end(), {K - s, N, N}) - a.begin() - 1]);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from closing.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:2118:5: note: candidate: 'template<class _FIter, class _Tp, class _Compare> _FIter std::upper_bound(_FIter, _FIter, const _Tp&, _Compare)'
2118 | upper_bound(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_algo.h:2118:5: note: template argument deduction/substitution failed:
closing.cpp:40:89: note: candidate expects 4 arguments, 3 provided
40 | ans = max(ans, ry - ly + 1 + b[upper_bound(a.begin(), a.end(), {K - s, N, N}) - a.begin() - 1]);
| ^