- BC20260025's blog
水题合集3
- 2024-1-4 15:59:31 @
P3378
# include<iostream>
# include<queue>
using namespace std;
int n,op,x;
priority_queue<int,vector<int>,greater<int> > q;
int main(){
cin>>n;
while(n--){
cin>>op;
switch(op){
case 1:
cin>>x;
q.push(x);
break;
case 2:
cout<<q.top()<<endl;
break;
case 3:
q.pop();
break;
}
}
return 0;
}