I have been in the past 24 hours, has been the problem of the toss ...
Topic:
A Math Game
Time limit:2000/1000ms (java/others) Memory limit:256000/128000kb (java/others)
Problem Description
Recently, Losanto find an interesting Math game. The rule is Simple:tell your a number H, and you can choose some numbers from a set {a[1],a[2],......, a[n]}. If the sum of the number you choose are H, then you win. Losanto just want to know whether he can win the game.
Input
There is several cases.
In each case, there is numbers in the first line n (the size of the set) and H. The second line has n numbers {a[1],a[2],......, a[n]}.0<n<=40, 0<=h<10^9, 0<=a[i]<10^9,all the numbers is integers.
Output
If Losanto could win the game, output "Yes" in a line. Else output "No" in a line.
Sample Input
10 87
2 3 4 5 7 9 10 11 12 13
10 38
2 3 4 5 7 9 10 11 12 13
Sample Output
No
Yes
A brief description of the subset and problem.
ACM turns out to be so funny