Problem bananasmoothie
User Winstone
Submission Time 2025-06-19 16:33:33
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bananasmoothie.cpp: In function ‘int main()’:
bananasmoothie.cpp:11:16: error: ‘greatest’ was not declared in this scope
11 | sort(q, q+n, greatest<long long>());
| ^~~~~~~~
bananasmoothie.cpp:11:25: error: expected primary-expression before ‘long’
11 | sort(q, q+n, greatest<long long>());
| ^~~~
bananasmoothie.cpp:14:5: error: ‘sum’ was not declared in this scope
14 | sum += Q[k-1] + i*k;
| ^~~
bananasmoothie.cpp:14:12: error: ‘Q’ was not declared in this scope
14 | sum += Q[k-1] + i*k;
| ^
bananasmoothie.cpp:17:11: error: ‘sum’ was not declared in this scope
17 | cout << sum;
| ^~~