CSES PROBLEM:Book Shops II. Help needed

Правка en1, от Sumanto, 2020-06-27 09:18:26

https://cses.fi/problemset/task/1159/

In this problem I used 0-1 knapsack to solve but got time limit exceeded. My approach to handle copies was to make duplicates of those items and apply knapsack. But it failed to pass few of the test cases(TLE). Any help will be appreciated.

My Code

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Sumanto 2020-06-27 09:18:26 1380 Initial revision (published)