i want to know how to optimize classic 0/1 knapsack to 0/k knapsack . the problem link is https://open.kattis.com/problems/thief
| № | Пользователь | Рейтинг |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | Kevin114514 | 3678 |
| 3 | VivaciousAubergine | 3647 |
| 4 | jiangly | 3582 |
| 5 | strapple | 3515 |
| 6 | tourist | 3473 |
| 7 | Radewoosh | 3418 |
| 8 | Um_nik | 3376 |
| 9 | maroonrk | 3361 |
| 10 | turmax | 3345 |
| Страны | Города | Организации | Всё → |
| № | Пользователь | Вклад |
|---|---|---|
| 1 | Qingyu | 162 |
| 2 | adamant | 148 |
| 3 | Um_nik | 146 |
| 4 | Dominater069 | 143 |
| 5 | errorgorn | 141 |
| 6 | cry | 138 |
| 7 | Proof_by_QED | 136 |
| 8 | YuukiS | 135 |
| 9 | chromate00 | 134 |
| 10 | soullless | 133 |
i want to know how to optimize classic 0/1 knapsack to 0/k knapsack . the problem link is https://open.kattis.com/problems/thief
| Название |
|---|



.
still this solution not work it exceed time limit . we can do this in O(knapsack_size*num_of_items) i am getting how to do this so can any body help me ??
.
I don't think that this question simply asks for 0/k knapsack (or bounded knapsack, the popular name). You can check here and here for a better explanation.
can any explain how to do this problem