Problem offerings
User Sans12345
Submission Time 2025-12-16 09:59:07
Score 0
Max Time N/A
Max Memory N/A

Compile Error

offerings.cpp: In function ‘int main()’:
offerings.cpp:21:50: error: no matching function for call to ‘max(ll&, long long int)’
21 | for(int _max=0;_max<=max(pref,0ll);_max++){
| ^
In file included from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from offerings.cpp:3:
/usr/include/c++/9/bits/stl_algobase.h:222:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)’
222 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/9/bits/stl_algobase.h:222:5: note: template argument deduction/substitution failed:
offerings.cpp:21:50: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘long long int’)
21 | for(int _max=0;_max<=max(pr