For this Question: Akash is hosting a farewell party and wants to serve the most delicious pizzas to his K friends. There are N restaurants in the city, numbered from 1 to N, and each restaurant has a rating between 1 and 100. Akash wants to select K different restaurants such that the minimum rating of any selected restaurant is maximized. Help Akash find the maximum possible minimum rating of the K-selected restaurants for his farewell party.The first line of the input contains 2 space-separated integers N and K.
The second line of the input contains N space-separated integers denoting the rating of restaurants.

<b>Constraints</b>
1 &le; K &le; N &le; 10<sup>5</sup>Print the maximum possible minimum rating of the K selected restaurants for Akash's farewell party.<b>Sample Input</b>
5 3
10 20 30 40 50
<b>Sample output</b>
30
<b>Explanation</b>
Akash can select restaurants with ratings 30, 40, and 50 for his friends. The minimum rating among these restaurants is 30, which is the maximum possible minimum rating of the selected restaurants., I have written this Solution Code: #include <bits/stdc++.h>

using namespace std;

int main() {
    int n, k;
    cin >> n >> k;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    sort(a.begin(), a.end());
    cout << a[n - k] << "\n";
    return 0;
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?