Problem | rabbitjoke |
---|---|
User | bribritt |
Submission Time | 2025-09-06 16:55:44 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
rabbitjoke.cpp: In function ‘int main()’:
rabbitjoke.cpp:12:23: error: no matching function for call to ‘nth_element(int [n], int*, int)’
12 | nth_element(h,h+n,n-k);
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from rabbitjoke.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:4787:5: note: candidate: ‘template<class _RAIter> void std::nth_element(_RAIter, _RAIter, _RAIter)’
4787 | nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
| ^~~~~~~~~~~
/usr/include/c++/9/bits/stl_algo.h:4787:5: note: template argument deduction/substitution failed:
rabbitjoke.cpp:12:23: note: deduced conflicting types for parameter ‘_RAIter’ (‘int*’ and ‘int’)
12 | nth_element(h,h+n,n-k);
| ^
In file included from /usr/include/c++/9/algorithm:62,