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: import java.io.*;
import java.util.*;



class Main {
    public static void main (String[] args) throws IOException {
        InputStreamReader r = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(r);

        String line[] = br.readLine().strip().split(" ");

        int n = Integer.parseInt(line[0]);
        long k = Long.parseLong(line[1]);

        int arr[] = new int[n];
        line = br.readLine().strip().split(" ");
        for(int i=0; i<n; i++){
            arr[i] = Integer.parseInt(line[i]);
        }
        Arrays.sort(arr);

        long sum = 0;
        int ans = -1;

        for(int i=n-1; i>=0; i--){
            sum+=arr[i];
            if(sum >= k){
                ans = n-1-i+1;
                break;
            }
        }
        System.out.println(ans);
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?