Problem candies_ioi
User ThePwo
Submission Time 2024-12-14 02:40:58
Score 0
Max Time N/A
Max Memory N/A

Compile Error

candies_ioi.cpp: In function ‘std::vector<int> distribute_candies(std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)’:
candies_ioi.cpp:27:67: error: no matching function for call to ‘min(ll, int&)’
27 | ans[cc[ptr].second] = min(pre[n + 1] + mn.first, cc[ptr].first);
| ^
In file included from /usr/include/c++/9/vector:60,
from candies_ioi.h:1,
from candies_ioi.cpp:1:
/usr/include/c++/9/bits/stl_algobase.h:198:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)’
198 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/9/bits/stl_algobase.h:198:5: note: template argument deduction/substitution failed:
candies_ioi.cpp:27:67: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘int’)
27 |