specific Knapsack Algorithm : <p>I have problem with solve the specific knapsack algorithm problem. Is there someone who give me some tips or help me? I solved it by Brute Force method but the execute time is very long (I checked all possible combinations and take the best solution - it works). I need to solve it by Dynamic Programming or Greedy Algorithm (but better by DP). I read about it a lot and I can't find the solution with it ;/ It is hard exercise.
<a href="https://i.stack.imgur.com/AHXjG.png" rel="nofollow noreferrer">HERE IS description of my exercise</a></p>

<p><a href="https://i.stack.imgur.com/FFmHx.png" rel="nofollow noreferrer">HERE ARE TESTS FOR THIS EXERCISE</a></p>
