How to check if some number can be retrieved as the result of the summation or difference of the given numbers
I have an arbitrary list of positive integers and some number X. I want to check if it is possible to retrieve X using basic operations such as summation and difference.