Problem GSS
User Junxian
Submission Time 2026-07-11 09:34:40
Score 0
Max Time N/A
Max Memory N/A

Compile Error

GSS.cpp: In function ‘int main()’:
GSS.cpp:9:13: error: redeclaration of ‘long long int x’
9 | long long x;
| ^
GSS.cpp:8:17: note: ‘long long int x’ previously declared here
8 | for (long long x; x < n; x++) {
| ^
GSS.cpp:11:7: error: ‘i’ was not declared in this scope
11 | arr[i] = x;
| ^
GSS.cpp:13:7: error: ‘a’ was not declared in this scope
13 | sort(a, a+n, greater<int>());
| ^
GSS.cpp:19:15: error: ‘i’ was not declared in this scope
19 | sum += arr[i];
| ^