Problem sort
User ZacharyTan2010
Submission Time 2024-03-04 15:31:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sort.cpp: In function ‘int main()’:
sort.cpp:9:22: error: no matching function for call to ‘sort(long unsigned int [1], long unsigned int)’
9 | sort(arr,sizeof(arr));
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from sort.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:
sort.cpp:9:22: note: deduced conflicting types for parameter ‘_RAIter’ (‘long unsigned int*’ and ‘long unsigned int’)
9 | sort(arr,sizeof(arr));
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/in