Problem lunchbox
User tanyikai
Submission Time 2025-06-18 15:21:38
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:12:12: error: ‘class std::priority_queue<long long int, std::vector<long long int>, std::greater<long long int> >’ has no member named ‘push_back’
12 | pq.push_back[i];
| ^~~~~~~~~
lunchbox.cpp:15:25: error: no match for ‘operator[]’ (operand types are ‘std::priority_queue<long long int, std::vector<long long int>, std::greater<long long int> >’ and ‘long long int’)
15 | lunchboxes -= pq[j];
| ^
lunchbox.cpp:20:18: error: expected ‘;’ before ‘return’
20 | cout<<counter
| ^
| ;
21 | return 0;
| ~~~~~~