For this Question: You are given an array <b>A</b> of size <b>N</b>. Find the minimum subsequence size of this array such that the sum of its elements is <b>at least K</b>. If there is no such subsequence possible, print -1.
<b>Subsequence of an array can be obtained by erasing some (possibly zero) elements from the array. </b>First line of the input contains two integers N and K.
The second line of input contains N space- seperated integers.

Constraint:
1 <= N <= 10<sup>5</sup>
1 <= K <= 10<sup>14</sup>
1 <= A<sub>i</sub> <= 10<sup>9</sup>Print the minimum size of the required subsequence. If there is no such possible subsequence, print -1.Sample Input:
5 17
9 4 7 6 2

Sample Output:
3

Explaination:
We can use the subsequence {4, 7, 6}. Their sum = 4 + 7 + 6 = 17.
We cannot obtain sum 17 in less than 3 subsequence size., I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;

#define fast ios_base::sync_with_stdio(false); cin.tie(NULL);
#define int long long
#define pb push_back
#define ff first
#define ss second
#define endl '\n'
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()

using T = pair<int, int>;

typedef long long ll;
const int mod = 1e9 + 7;
const int INF = 1e9;

void solve() {
	int n, k;
    cin >> n >> k;
    vector<int> a(n);
    for(auto &i : a) cin >> i;
    sort(rall(a));
    int cur = 0;
    for(int i = 0; i < n; i++){
        cur += a[i];
        if(cur >= k){
            cout << i + 1;
            return;
        }
    }
    cout << -1;
}

signed main(){
    fast
    int t = 1;
    // cin >> t;
    for(int i = 1; i <= t; i++){
        solve();
        if(i != t) cout << endl;
    }
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?