全部re了为什么啊
查看原帖
全部re了为什么啊
914335
xiongmy123楼主2023/9/28 00:08
#include <bits/stdc++.h>
using namespace std;
priority_queue<int,vector<int>,greater<int>> q;
int main(){
	long n;
	cin>>n;
	while(n--){
		int op,x;
		cin>>op;
		if(op==1){
			cin>>x;
			q.push(x);
		}
		if(op==2)cout<<q.top();
		else q.pop();
	}
	return 0;
}
2023/9/28 00:08
加载中...