Problem platonic2
User WangZhenxuan
Submission Time 2025-06-19 09:49:52
Score 0
Max Time N/A
Max Memory N/A

Compile Error

platonic2.cpp: In function ‘int main()’:
platonic2.cpp:10:29: error: ‘N’ was not declared in this scope
10 | vector<int> arrayvector(N);
| ^
platonic2.cpp:17:61: error: no matching function for call to ‘sort(std::vector<int>::iterator, <unresolved overloaded function type>, std::greater<int>)’
17 | sort(arrayvector.begin(), arrayvector.end,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 platonic2.cpp:3:
/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 argu