Hostel visit using max heap

what’s wrong with my code ?

int main() { fast; int q,k; cin>>q>>k; priority_queuepq; while(q–){ int type,x,y; cin>>type; if(type==1){ cin>>x>>y; pq.push(xx + yy *1LL); if(pq.size() > k){ pq.pop(); } } else{ cout<<pq.top()<<endl; } } return 0; }

Please share your code using ide.codingblocks.com.

Hi Archit
Since you are not responding to this thread I am marking your doubt as resolved. You can reopen this thread again anytime if your doubt persists.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.