there group n member list crime commit the ith crime generate profiti require groupi member participate if member participate crime member can not participate crimelet profitable scheme subset crime generate minprofit profit total number member participate subset crime nreturn number scheme choose since answer large return modulo 109 7 Example 1input n 5 minprofit 3 group 22 profit 23output 2explanation to profit 3 group commit crime 0 1 crime 1in total 2 schemesExample 2input n 10 minprofit 5 group 235 profit 678output 7explanation to profit 5 group commit crime long commit onethere 7 possible scheme 0 1 2 01 02 12 012 constraints1 n 1000 minProfit 1001 grouplength 1001 groupi 100profitlength grouplength0 profiti 100