Problem buyingcandy
User dooweidde
Submission Time 2025-12-05 17:07:22
Score 0
Max Time N/A
Max Memory N/A

Compile Error

buyingcandy.cpp: In function ‘int main()’:
buyingcandy.cpp:31:4: error: ‘total’ was not declared in this scope
31 | total += prices[i] - pq.top();
| ^~~~~
buyingcandy.cpp:34:4: error: ‘total’ was not declared in this scope
34 | total += prices[i];
| ^~~~~