Atcoder Subset Problem

Hello! I’m trying to solve this problem https://atcoder.jp/contests/abc044/tasks/arc060_a, it is similar to subset sum problem, I can write a recursive function and can memoize it to get the result. But my basic recursive function is not working. I want to solve it first using basic recursion. Here is the link to the code- https://ide.codingblocks.com/s/77274