Question PRG-CPP-0064
HardWhat is the output of this program?
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
int main() {
priority_queue<int> pq;
for (int x : {4, 9, 1, 7}) pq.push(x);
priority_queue<int, vector<int>, greater<int>> mn;
for (int x : {4, 9, 1, 7}) mn.push(x);
cout << pq.top() << mn.top();
return 0;
}
- A.
91
- B.
19
- C.
Sign up free to see the answer and a step-by-step explanation.