Gus Fring's Large Consignment

0

0 votes
Easy, Easy
Problem

Problem removed

Sample Input
2
20
4
5 2 6 1
1
2
2 3
Sample Output
4
-1
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

For Case 1: m=20. containers of sizes 6,2,5,1 are available in infinite number. We take 3 containers of size 6 and 1 container of size 2 to fill 20 kg meth. so ans is 3 + 1 =4.

Editor Image

?