(String args[])
| 23 | |
| 24 | } |
| 25 | public static void main(String args[]) { |
| 26 | Scanner sc=new Scanner(System.in); |
| 27 | int t=sc.nextInt(); |
| 28 | for(int x=1;x<=t;x++) |
| 29 | { |
| 30 | |
| 31 | int n=sc.nextInt(); |
| 32 | int a[]=new int[n]; |
| 33 | int h=sc.nextInt(); |
| 34 | String s=sc.next(); |
| 35 | clusters(s,n,a); |
| 36 | int flag=0; |
| 37 | for(int x1=0;x1<n;x1++) |
| 38 | { |
| 39 | if(a[x1]!=0) |
| 40 | { |
| 41 | if(a[x1]>=h) |
| 42 | { |
| 43 | flag=1; |
| 44 | break; |
| 45 | } |
| 46 | else if (a[x1]>h/2) |
| 47 | { |
| 48 | h=2*(h-a[x1]); |
| 49 | } |
| 50 | } |
| 51 | } |
| 52 | String ans = flag == 1 ? "YES" : "NO"; |
| 53 | System.out.println(ans); |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | // Input |