Problem | chokolit |
---|---|
User | om2024 |
Submission Time | 2024-08-01 16:40:23 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
chokolit.cpp: In function ‘int main()’:
chokolit.cpp:10:28: error: no matching function for call to ‘sort(int [n], int&, std::greater<int>)’
10 | sort(arr,n,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 chokolit.cpp:2:
/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:
chokolit.cpp:10:28: note: deduced conflicting types for parameter ‘_RAIter’ (‘int*’ and ‘int’)
10 | sort(arr,n,greater<int>());
| ^
In file included from /usr/include/c++/9/algorithm:62,