#include <bits/stdc++.h>
using namespace std;
int main() {
// priority_queue
// push
// size
// top pop empty
priority_queue<int> pq;
pq.push(1);
pq.push(5);
pq.push(2);
pq.push(6);
cout << pq.top(); // print 6
pq.pop();
cout << pq.top(); // print 5
cout << endl;
priority_queue<pair<int,int>> pq2;
pq2.push({1, 5});
pq2.push({1, 6});
pq2.push({1, 7});
cout << pq2.top().first;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCS8vIHByaW9yaXR5X3F1ZXVlIAoJLy8gcHVzaCAKCS8vIHNpemUgCgkvLyB0b3AgcG9wIGVtcHR5IAoJcHJpb3JpdHlfcXVldWU8aW50PiBwcTsKCXBxLnB1c2goMSk7IAoJcHEucHVzaCg1KTsgCglwcS5wdXNoKDIpOyAKCXBxLnB1c2goNik7IAogCgljb3V0IDw8IHBxLnRvcCgpOyAvLyBwcmludCA2IAoJcHEucG9wKCk7IAoJY291dCA8PCBwcS50b3AoKTsgLy8gcHJpbnQgNSAKCWNvdXQgPDwgZW5kbDsKIAoJcHJpb3JpdHlfcXVldWU8cGFpcjxpbnQsaW50Pj4gcHEyOwoJcHEyLnB1c2goezEsIDV9KTsgCglwcTIucHVzaCh7MSwgNn0pOyAKCXBxMi5wdXNoKHsxLCA3fSk7IAoJY291dCA8PCBwcTIudG9wKCkuZmlyc3Q7IAoJCglyZXR1cm4gMDsKfQo=