Problem deathray
User sharelletqx
Submission Time 2026-04-25 11:13:21
Score 0
Max Time N/A
Max Memory N/A

Compile Error

deathray.cpp: In function ‘int main()’:
deathray.cpp:9:46: error: template argument 3 is invalid
9 | priority_queue<int,vector<int>,greater<int> pq;
| ^~
deathray.cpp:13:6: error: request for member ‘push’ in ‘pq’, which is of non-class type ‘int’
13 | pq.push(l[i]);
| ^~~~
deathray.cpp:23:14: error: request for member ‘empty’ in ‘pq’, which is of non-class type ‘int’
23 | while(!pq.empty() and pq.top()<=d){
| ^~~~~
deathray.cpp:23:29: error: request for member ‘top’ in ‘pq’, which is of non-class type ‘int’
23 | while(!pq.empty() and pq.top()<=d){
| ^~~
deathray.cpp:24:10: error: request for member ‘pop’ in ‘pq’, which is of non-class type ‘int’
24 | pq.pop();
| ^~~
deathray.cpp:31:10: error: request for member ‘empty’ in ‘pq’, which is of non-class type ‘int