Problem lineup2
User PrunJuice
Submission Time 2024-12-26 20:13:15
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lineup2.cpp: In function ‘int main()’:
lineup2.cpp:20:52: error: no matching function for call to ‘max_element(<unresolved overloaded function type>, <unresolved overloaded function type>)’
20 | cout << *max_element(Lineup2.begin, Lineup2.end);
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from lineup2.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:5713:5: note: candidate: ‘template<class _FIter> constexpr _FIter std::max_element(_FIter, _FIter)’
5713 | max_element(_ForwardIterator __first, _ForwardIterator __last)
| ^~~~~~~~~~~
/usr/include/c++/9/bits/stl_algo.h:5713:5: note: template argument deduction/substitution failed:
lineup2.cpp:20:52: note: couldn’t deduce template parameter ‘_FIter’
20 | cout << *max_element(Lineup2.begin,