1#include <bits/stdc++.h>
2using namespace std;
3typedef pair<int, int> pi;
4// main program
5int main() {
6 priority_queue<pi, vector<pi>, greater<pi> > pq;
7 pq.push(make_pair(10, 200));
8 pq.push(make_pair(20, 100));
9 pq.push(make_pair(15, 400));
10 pair<int, int> top = pq.top();
11 cout << top.first << " " << top.second;
12 return 0;
13}
1#include <bits/stdc++.h>
2using namespace std;
3// main program
4int main() {
5 priority_queue<pair<int, int> > priorityq;
6 priorityq.push(make_pair(18, 200));
7 priorityq.push(make_pair(29, 100));
8 priorityq.push(make_pair(11, 400));
9 pair<int, int> top = priorityq.top();
10 cout << top.first << " " << top.second;
11 return 0;
12}