Problem deforestation
User Tyx2019
Submission Time 2023-11-21 20:11:19
Score 0
Max Time N/A
Max Memory N/A

Compile Error

deforestation.cpp: In function ‘int32_t main()’:
deforestation.cpp:23:64: error: type/value mismatch at argument 3 in template parameter list for ‘template<class _Tp, class _Sequence, class _Compare> class std::priority_queue’
23 | priority_queue<pair<int,int>,vector<pair<int,int>>,comp> pq;
| ^
deforestation.cpp:23:64: note: expected a type, got ‘comp’
deforestation.cpp:27:16: error: request for member ‘push’ in ‘pq’, which is of non-class type ‘int’
27 | pq.push(arr[i]);
| ^~~~
deforestation.cpp:31:19: error: request for member ‘empty’ in ‘pq’, which is of non-class type ‘int’
31 | while(!pq.empty()){
| ^~~~~
deforestation.cpp:33:24: error: request for member ‘top’ in ‘pq’, which is of non-class type ‘int’
33 | if(time(pq.top())<tm) can=false;