ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1005. Stone Pile

Has anyone solve this by dynamic programming?
Posted by phizaz 5 Apr 2011 22:54
please tell me how do you?
I found one algo but it uses memory equal to W<sub>i</sub> limitation. if maximum of W<sub>i</sub> is 100000 it uses 100000 too. Maybe it use 2 times more.

Edited by author 05.04.2011 22:59
Re: Has anyone solve this by dynamic programming?
Posted by Bahador Biglari 12 Dec 2011 21:13
Hey, did you solve it with DP ? Please let me know how did you solve it ?

Thanks
Re: Has anyone solve this by dynamic programming?
Posted by morbidel 12 Dec 2011 22:50
Hello,
Read about the knapsack problem (http://en.wikipedia.org/wiki/Knapsack_problem#Dynamic_programming_solution) which can be solved with DP and try to figure out how it can be applied here. Good luck!