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 1359. Construction

Hello everyboby! I found solution in O(n^4), what about others? (-)
Posted by Victor Barinov (TNU) 23 Mar 2005 17:40
Mine is O(N^4) dp (-)
Posted by Dmitry 'Diman_YES' Kovalioff 23 Mar 2005 18:09
But it is very slow! Is it possible to accelerate it without precalculation? (-)
Posted by Victor Barinov (TNU) 23 Mar 2005 20:23
Of course... (+)
Posted by Dmitry 'Diman_YES' Kovalioff 23 Mar 2005 20:46
The fastest solution is precalc (as usual :] ), but you can make your solution very fast without it. It is clear that there is some physical dependence in this problem - the line of optimal movement is some function (a parabola, I presume). So you can look for several nearest points with integer coordinates and use dp only for them. But it is much more difficult and unsafe, isn't it?
Re: Of course... (+)
Posted by Ilya Rasenstein (Lyceum #40) 4 Sep 2005 11:15
Not parabola, but cycloid! It's variational stuff :)!
Re: Of course... (+)
Posted by Kirin Vladislav 3 Oct 2006 21:16
What is cycloid's formula?