You are given a list of non-negative integers, a1, a2, …, an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and - as its new symbol.
Find out how many ways to assign symbols to make sum of integers equal to target S.
1 2 3 4 5 6 7 8 9 10 11 12 13
Example:
Input: nums is [1, 1, 1, 1, 1], S is 3. Output: 5 Explanation: