Need help in a variation of 0-1 knapsack problem

Правка en1, от shivn, 2023-10-23 21:19:23

There are n tickets numbered from 1 to n. Each ticket has a price given by the array price[] and the number of points that you will get after purchasing the ticket is given in another array points[]. You have x amount of money. You need to find out the maximum number of points you can get.

Constraints are 1<=n<=36 1<=price[i]<=1e9 for all i from 1 to n 1<=points[i]<=1e9 for all i from 1 to n and x<=1e9

I am not able to come up with the optimised approach to the problem. Can someone help me to solve this!!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский shivn 2023-10-23 21:19:23 574 Initial revision (published)