Problem
Given an array of distinct integersnums and a target integer target, return the number of possible combinations that add up to target.
The test cases are generated so that the answer can fit in a 32-bit integer.
Note that different sequences are counted as different combinations.
Examples
Constraints
- 1 <= nums.length <= 200
- 1 <= nums[i] <= 1000
- All the elements of
numsare unique. - 1 <= target <= 1000