Company: Buyhatke_30march
Difficulty: medium
Sam And Friends Problem Description Sam likes making sweets. He can make n different types of sweets. A sweet is defined by two things, first A i which denotes the time it takes to make the i -th sweet, and B i the sweetness level of the i -th sweet. But Sam is also a busy person, and he has only m days with him and on a given day he can devote at maximum C j time on the j -th day. Help him decide how many sweets he can make while maximizing the total sweetness of all the sweets taken together and the number of sweets made. Note: He can make the i -th type of sweet only once and at most only one sweet per day. Input Format The first line contains n the different types of sweet The next n lines contain the elements of array A The next line again contains n . After it, the next n lines contain the elements of array B The next line contains m , the number of days he has with him to prepare sweets. The next m lines contain the elements of array C Constraints 1 <= n, m, A i , B i , C j &