For this Question: You are given a sequence of numbers of size N. You have to find if there is a way to insert + or - operator in between the numbers so that the result equals K.The first line of input contains two integers N and K. The next line of input contains N space- separated integers depicting the values of the sequence.

Constraints:-
1 <= N <= 20
-10^15 <= K <= 10^15
0 <= Numbers <=10^13Print YES if possible else print NO.Sample Input:-
4 4
1 2 3 4

Sample Output:-
YES

Sample Input:-
4 1
1 2 3 4

Sample Output:-
NO, I have written this Solution Code: 














































import java.io.*;
import java.util.*;



class Main {

	public static boolean isArrangementPossible(long arr[],int n,long sum){
		if(n==1){
			if(arr[0]==sum)
			return true;
			else
			return false;
		}
		return(isArrangementPossible(arr,n-1,sum-arr[n-1]) || isArrangementPossible(arr,n-1,sum+arr[n-1]));
	}


	public static void main (String[] args) throws IOException {
		BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
		String str1[]=br.readLine().trim().split(" ");
		int n=Integer.parseInt(str1[0]);
		long sum=Long.parseLong(str1[1]);
		String str[]=br.readLine().trim().split(" ");
		long arr[]=new long[n];
		for(int i=0;i<n;i++){
			arr[i]=Long.parseLong(str[i]);
		}
		if(isArrangementPossible(arr,n,sum)){
			System.out.println("YES");
		}else{
			System.out.println("NO");
		}

	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?