Trace Target Sum on nums=[1,1,1,1,1] with target S=3. Sum is 5. We need (5+3)/2=4 as the positive subset sum. Find subsets summing to 4. Count dp[s] = number of ways to make sum s. After processing all five 1s: dp[0]=1, dp[1]=5, dp[2]=10, dp[3]=10, dp[4]=5, dp[5]=1.
Answer: dp[4]=5 ways. These correspond to choosing 4 ones as positive and 1 as negative: +1+1+1+1−1=3.