Problem burgers
User Vinayak01
Submission Time 2024-02-01 21:22:51
Score 0
Max Time N/A
Max Memory N/A

Compile Error

burgers.cpp: In function ‘int main()’:
burgers.cpp:26:37: error: no matching function for call to ‘min(int&, __gnu_cxx::__enable_if<true, double>::__type)’
26 | best1 = min(best1,floor(x[i]/a[i]));
| ^
In file included from /usr/include/c++/9/vector:60,
from burgers.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:
burgers.cpp:26:37: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘__gnu_cxx::__enable_if<true, double>::__type’ {aka ‘double’})
26 | best1 = min(best1,floor(x[i]/a[i]));
| ^
In file included from /usr/include/c++/9/vector:60,