| Problem | buyingcandy |
|---|---|
| User | lucaleeeeee |
| Submission Time | 2026-11-09 15:21:35 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
buyingcandy.cpp: In function ‘int main()’:
buyingcandy.cpp:22:51: error: ‘p’ was not declared in this scope
22 | while (ptr < n && discounts[ptr].first <= p[i]) {
| ^
buyingcandy.cpp:26:25: error: ‘sum’ was not declared in this scope
26 | if (pq.empty()) sum += pricing[i];
| ^~~
buyingcandy.cpp:28:13: error: ‘sum’ was not declared in this scope
28 | sum += pricing[i] - pq.top(); pq.pop();
| ^~~
buyingcandy.cpp:31:13: error: ‘sum’ was not declared in this scope
31 | cout << sum;
| ^~~