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

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:9:18: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp, class _Sequence, class _Compare> class std::priority_queue’
9 | priority_queue<m> pq;
| ^
lunchbox.cpp:9:18: note: expected a type, got ‘m’
lunchbox.cpp:9:18: error: template argument 2 is invalid
lunchbox.cpp:9:18: error: template argument 3 is invalid
lunchbox.cpp:13:9: error: invalid types ‘int[int]’ for array subscript
13 | if(pq[m](i) < N){
| ^
lunchbox.cpp:14:7: error: invalid types ‘int[int]’ for array subscript
14 | pq[m](i++);
| ^
lunchbox.cpp:17:18: error: ‘pq’ cannot be used as a function
17 | else cout << pq()+1;
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,