P16932 [HackerEarth] In the mysterious country of ABD, everything is quite different from what you'd
普及
题目描述

In the mysterious country of ABD, everything is quite different from what you'd
normally expect. In most places, if you were approached by two mobsters in a dark alley, they would
probably tell you to give them all the money that you have. If you refused, or didn't have any -
they might even beat you up.
In ABD the government decided that even the slightest chance of someone getting injured has to be ruled out. So, they introduced a strict policy. When a mobster approaches you in a dark
alley, he asks you for a specific amount of money. You are obliged to show him all the money that
you have, but you only need to pay up if he can find a subset of your banknotes whose total value
matches his demand. Since banknotes in ABD can have any positive integer value smaller than
one thousand you are quite likely to get off without paying.
Both the citizens and the gangsters of ABD have very positive feelings about the system. No one ever
gets hurt, the gangsters don't lose their jobs, and there are quite a few rules that minimize that
probability of getting mugged (the first one is: don't go into dark alleys - and this one is said to work in other places also).

Input

The first line contains integer t, the number of test cases (about 100). Then t test cases follow. Each test case starts with n, the
number of banknotes in your wallet, and m, the amount of money the muggers asked of you. Then n
numbers follow, representing values of your banknotes. Your wallet does not hold more than 20 banknotes, and the value of a single banknote is never more than 1000.

Output

For each test case output a single line with the word 'Yes' if there is a subset of your banknotes that sums to m, and 'No' otherwise.

SAMPLE INPUT
4
3 3
1 1 1
5 11
1 2 4 8 16
5 23
1 2 4 8 16
5 13
1 5 5 10 10

SAMPLE OUTPUT
Yes
Yes
Yes
No

Explanation

Explanation: For example, in the last case you have to pay up, since: 6+3+123=132.

输入格式

见题面

输出格式

见题面

样例输入
10 19 1243 385 203 400 833 411 466 11 754 179 321 495 964 606 512 708 826 719 13 794 11 13836 569 914 182 490 431 963 213 319 573 231 704 17 19984 538 188 449 901 294 981 223 789 297 181 301 357 359 373 370 506 655 18 4428 570 739 917 1 54 482 320 627 714 24 755 697 914 943 499 816 589 832 12 8379 481 572 32 838 284 757 560 790 412 117 217 982 17 1533 335 262 969 7 889 35 384 644 733 298 940 584 466 529 416 209 260 18 12135 644 87 418 401 647 208 165 764 425 148 972 912 835 234 234 843 475 269 20 6472 354 229 411 938 696 293 706 905 905 955 39 549 42 457 950 41 17 115 157 443 16 16130 707 803 715 941 998 542 211 577 14 917 806 777 856 502 70 914 1 6976 222
样例输出
Yes Yes Yes No No No Yes No Yes No