what is wrong in this code?? it is not giving the correct output.
#include
#include
#include
using namespace std;
int main() {
priority_queuepq;
int q,k,t,x,y;
cin>>q>>k;
while(q–){
cin>>t;
if(t==1){
int res=(xx)+(yy);
pq.push(res);
}
else{
while(pq.size()>k) pq.pop();
cout<<pq.top();
}
}
return 0;
}