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

ural_ghost Who solve this problem with DP, [7] // Problem 1005. Stone Pile 31 Oct 2007 20:40
I have solved it with Dp in 0.015.
Is there anyone fast(DP)?
AlainDelon Re: Who solve this problem with DP, // Problem 1005. Stone Pile 8 Dec 2007 15:00
I'd be more interested in your memory strategy. I don't think DP alg will differ much for the same problem
Skhan Re: Who solve this problem with DP, [2] // Problem 1005. Stone Pile 9 Dec 2007 10:42
Maybe the test data are so simple, and DP is able to accept.
But I don't think DP method is right.
KirillB(Arkhangelsk - PomorSU) Re: Who solve this problem with DP, [1] // Problem 1005. Stone Pile 10 Dec 2007 02:24
dp(bug task) and bruteforce (2^n) are both accepted
Madhav Re: Who solve this problem with DP, // Problem 1005. Stone Pile 12 Jun 2008 01:16
for me it got accepted with brute force
gaston770 Re: Who solve this problem with DP, // Problem 1005. Stone Pile 9 Feb 2009 03:29
Time : 0.015 (I think its the minimal time)  C++ using maps and vectors

Used DP

Want d code? gaston770@gmail.com

Less than 15 lines of the algorithm
yzthz Re: Who solve this problem with DP, // Problem 1005. Stone Pile 17 Mar 2009 18:54
My solution cost monstrously 0.187s using DP...
ans_ Re: Who solve this problem with DP, // Problem 1005. Stone Pile 28 Sep 2013 19:10
Легко решается с динамическим програмированием. Делишь сумму камней на 2 части, потом запускаешь рюкзак до суммы камней/2, ответом будет являться abs(sum-2*maxx), где sum - сумма камней, а maxx - макс. вес, который мы можем поместить в наш "рюкзак"