Problem paint
User Henries
Submission Time 2024-09-30 23:31:03
Score 0
Max Time N/A
Max Memory N/A

Compile Error

paint.cpp: In function ‘void solve(std::vector<long long int>, std::vector<long long int>)’:
paint.cpp:6:46: error: overloaded function with no contextual type information
6 | max = max_element(rates.begin(),rates.end());
| ^
paint.cpp:7:42: error: no matching function for call to ‘distance(std::vector<long long int>::iterator, <unresolved overloaded function type>)’
7 | int index = distance(rates.begin(), max);
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:66,
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 paint.cpp:1:
/usr/include/c++/9/bits/stl_iterator_base_funcs.h:138:5: note: candidate: ‘constexpr typename std::iterator_traits<_It