Problem sort
User Junxian
Submission Time 2026-02-28 11:09:47
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sort.cpp: In function ‘int main()’:
sort.cpp:9:21: error: invalid types ‘long long int[int]’ for array subscript
9 | cin >> arr[i];
| ^
sort.cpp:11:14: error: request for member ‘begin’ in ‘arr’, which is of non-class type ‘long long int’
11 | sort(arr.begin(), arr.end(), greater<long long>());
| ^~~~~
sort.cpp:11:27: error: request for member ‘end’ in ‘arr’, which is of non-class type ‘long long int’
11 | sort(arr.begin(), arr.end(), greater<long long>());
| ^~~
sort.cpp:13:22: error: invalid types ‘long long int[int]’ for array subscript
13 | cout << arr[i] << " ";
| ^