class Solution {
public:
vector<int> getLeastNumbers_Solution(vector<int> input, int k) {
priority_queue<int> h;
for (int i: input) {
h.push(i);
while (h.size() > k) {
h.pop();
}
}
vector<int> res;
while (!h.empty()) {
res.push_back(h.top());
h.pop();
}
reverse(res.begin(), res.end());
return res;
}
};