[第1章 1.5e1] 堆-模板

#include 
#define endl '\n'
using namespace std;
typedef long long ll;
int main(){
    ll n;
    cin>>n;
    priority_queue,greater<>>pq;
    while(n--){
        ll op;
        cin>>op;
        if(op==1){
            ll x;
            cin>>x;
            pq.push(x);
        }else if(op==2)cout<
posted @ 2026-06-26 20:49  水暖鸭先知乎  阅读(10)  评论(0)    收藏  举报