Problem problemsetter
User qifengle
Submission Time 2025-03-16 20:01:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

problemsetter.cpp: In function ‘int main()’:
problemsetter.cpp:25:56: error: expected ‘;’ before ‘long’
25 | sort(q.begin(), q.end(), greater<pair<int, int>>())
| ^
| ;
26 |
27 | long long sum = 0;
| ~~~~
problemsetter.cpp:34:17: error: ‘sum’ was not declared in this scope
34 | sum += max(satisfactionGain - q[j].second, 0);
| ^~~
problemsetter.cpp:40:13: error: ‘sum’ was not declared in this scope
40 | cout << sum;
| ^~~