Problem lunchbox
User claireau
Submission Time 2023-11-15 14:33:43
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:16:8: error: no match for ‘operator[]’ (operand types are ‘std::priority_queue<int, std::vector<int>, std::greater<int> >’ and ‘int’)
16 | for(pq[m](i) < N){
| ^
lunchbox.cpp:20:2: error: expected primary-expression before ‘else’
20 | else cout << pq()+1;
| ^~~~
lunchbox.cpp:19:4: error: expected ‘;’ before ‘else’
19 | }
| ^
| ;
20 | else cout << pq()+1;
| ~~~~
lunchbox.cpp:20:2: error: expected primary-expression before ‘else’
20 | else cout << pq()+1;
| ^~~~
lunchbox.cpp:19:4: error: expected ‘)’ before ‘else’
19 | }
| ^
| )
20 | else cout << pq()+1;
| ~~~~
lunchbox.cpp:16:5: note: to match this ‘(’
16 | for(pq[m](i) < N){
| ^
lunchbox.cpp:20:2: error: expected primary-expression before ‘else