Problem mountainjourney
User zhaoyz
Submission Time 2026-06-24 09:35:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

cc1plus: error: ‘::main’ must return ‘int’
mountainjourney.cpp: In function ‘int main()’:
mountainjourney.cpp:22:40: error: no matching function for call to ‘sort(std::vector<long long int>::iterator, <unresolved overloaded function type>, std::greater<long long int>)’
22 | sort(b.begin(),b.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 mountainjourney.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:
mountainjourney.cpp:22:40: note: candidate expects 2 arguments, 3 provide