mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-28 16:36:26 +00:00
26 lines
442 B
C++
26 lines
442 B
C++
#include<bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
priority_queue<int, vector<int>, greater<int> > q;
|
|
int n;
|
|
cin >> n;
|
|
while(n--) {
|
|
int op;
|
|
cin >> op;
|
|
if(op == 1) {
|
|
int x;
|
|
cin >> x;
|
|
q.push(x);
|
|
}
|
|
else if(op == 2) {
|
|
cout << q.top() << endl;
|
|
}
|
|
else if(op == 3) {
|
|
q.pop();
|
|
}
|
|
}
|
|
return 0;
|
|
}
|