https://hack.codingblocks.com/contests/c/457/1086
https://ide.codingblocks.com/#/s/29864
The Subset Sum To Target-hb
I am not able to understand your logic, but on testing it, i found a case it is failing for. You can evaluate with help of that case.
INPUT:
5 16
1 5 6 7 8
EXPECTED OUTPUT:
Yes
OUTPUT:
No