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

Show all messages Hide all messages

Hello, I've implemented two solutions: DP and Brut Force on ruby,
but still no luck to pass tests (#3, #4).
Does someone have good solution on ruby for that problem?
Is it my bad hands, or tests were changed and ruby cant process it fast.

If you have accepted solution, please try to submit it again.
Also, if you resolved it on ruby, please give some specific hints about solution.
Thanks!
I don't know much about Ruby but I've solved this problem on Python which I suppose has  similar performance. It's very important to optimize algorithm very well in order to pass all tests on those script languages. Time your code and try not to exceed 1 sec. limit with 20 stones. Sorry, no hints about algorithm from me.