Given number of items and maximum capacity…each item has corresponding id, profit and weight. How to find the subset in order to make the maximum possible profit using dp???

Please help me…to solve this question.

Input :

3 11

1 5 4

2 12 10

3 8 5

Output:

{1,3}

Explain : here 1st and 3rd items can be selected.

Peroblem link