Problem minimum
User fanqie
Submission Time 2023-11-15 09:48:45
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minimum.cpp: In function ‘int main()’:
minimum.cpp:9:26: error: no matching function for call to ‘sort(int [N], std::greater<int>)’
9 | sort(arr, greater<int>());
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from minimum.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:4863:5: note: candidate: ‘template<class _RAIter> void std::sort(_RAIter, _RAIter)’
4863 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
| ^~~~
/usr/include/c++/9/bits/stl_algo.h:4863:5: note: template argument deduction/substitution failed:
minimum.cpp:9:26: note: deduced conflicting types for parameter ‘_RAIter’ (‘int*’ and ‘std::greater<int>’)
9 | sort(arr, greater<int>());
| ^
In file included from /usr/include/c++/9/algorithm:62,