there set n item you give integer array value label value label ith element valuesi labelsi respectively you give integer numwante uselimitchoose subset s n element thatthe size subset s equal numwantedthere uselimit item label sthe score subset sum value subsetreturn maximum score subset s example 1input value 54321 label 11223 numwante 3 uselimit 1output 9explanation the subset choose fifth itemsExample 2input value 54321 label 13332 numwante 3 uselimit 2output 12Explanation the subset choose second itemsExample 3input value 98876 label 00011 numwante 3 uselimit 1output 16explanation the subset choose fourth item Constraintsn valueslength labelslength1 n 2 1040 valuesi labelsi 2 1041 numwante uselimit n