Problem competition
User xiaocai918
Submission Time 2026-11-29 14:36:26
Score 0
Max Time N/A
Max Memory N/A

Compile Error

competition.cpp: In function ‘int main()’:
competition.cpp:22:37: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp> struct std::greater’
22 | sort(x.begin(),x.end(),greater<int());
| ^
competition.cpp:22:37: note: expected a type, got ‘0’
competition.cpp:26:2: error: expected ‘,’ or ‘;’ before ‘for’
26 | for (int i = 0; i < n; i++) {
| ^~~
competition.cpp:26:18: error: ‘i’ was not declared in this scope
26 | for (int i = 0; i < n; i++) {
| ^
competition.cpp:45:1: error: expected ‘}’ at end of input
45 | }
| ^
competition.cpp:4:12: note: to match this ‘{’
4 | int main() {
| ^