Help in Arpa's weak amphitheater and Mehrdad's valuable Hoses

Revision en1, by wish_me, 2017-12-28 20:34:40

Hey, Everyone I am unable to understand that how should I apply knapsack in this problem

http://codeforces.me/problemset/problem/741/B

Because it contains different groups.Thus Mine complexity is coming O(W*N*N).I saw the editorial but unable to understand the solution.Can anyone explain ?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English wish_me 2017-12-28 20:34:40 358 Initial revision (published)