Description
Given n members, minProfit target, and crimes with group requirements and profits, count schemes reaching minProfit using at most n members.
Examples
Input:
n = 5, minProfit = 3, group = [2,2], profit = [2,3]Output:
2Explanation:
Two profitable schemes.
Input:
n = 3, minProfit = 0, group = [1,2], profit = [1,2]Output:
4Explanation:
With minProfit = 0, all 4 combinations of schemes (including none) that use at most 3 people are valid.
Input:
n = 1, minProfit = 10, group = [1,1,1], profit = [3,4,5]Output:
3Explanation:
With 1 person and minProfit = 10, there are 3 profitable scheme combinations.
Constraints
- •
1 ≤ n ≤ 100