Please read the new rule regarding the restriction on the use of AI tools. ×
Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

Getting WA in SPOJ PARTY Problem(DP)

Revision en1, by Csk, 2020-07-01 08:39:40

Question — https://www.spoj.com/problems/PARTY/ My Solution — https://ideone.com/5e2C5G

In my viewpoint, calculating the maximum value for party enjoyment is easy by using classical knapsack problem but when it comes to calculate the cost, not only its giving WA for cost but also it gives WA for maximum value for party enjoyment!

I used top down approach and please help me!

Tags #dynamic programing

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Csk 2020-07-01 08:39:40 431 Initial revision (published)