Problem lunchbox
User Pandin
Submission Time 2024-06-19 14:46:09
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:6:1: error: ‘cin’ was not declared in this scope
6 | cin >>N>>m;
| ^~~
lunchbox.cpp:7:1: error: ‘priority_queue’ was not declared in this scope
7 | priority_queue<int, vector<int>, greater<int>> pq;
| ^~~~~~~~~~~~~~
lunchbox.cpp:7:16: error: expected primary-expression before ‘int’
7 | priority_queue<int, vector<int>, greater<int>> pq;
| ^~~
lunchbox.cpp:10:5: error: ‘pq’ was not declared in this scope
10 | pq.push(k);
| ^~
lunchbox.cpp:15:12: error: ‘pq’ was not declared in this scope
15 | total-=pq.top();
| ^~
lunchbox.cpp:19:1: error: ‘cout’ was not declared in this scope
19 | cout << pq.size();
| ^~~~
lunchbox.cpp:19:9: error: ‘pq’ was not declared in this scope
19 | cout << pq.size();
| ^~