Problem airplane2
User Lewis
Submission Time 2026-02-27 17:48:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

airplane2.cpp: In function ‘int main()’:
airplane2.cpp:39:46: error: no matching function for call to ‘max(long long int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >, void>::difference_type)’
39 | maxc = max(maxc, count(c.begin(),c.end(),b));
| ^
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 airplane2.cpp:1:
/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:
airplane2.cpp:39:46: note: deduced conflicting