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 1117. Hierarchy

Dymanic Programing.
Posted by Y.Y.M. 22 Jun 2004 18:49
Re: Dymanic Programing.
Posted by paulo 5 Jul 2004 16:31
Time Limit Exceeded Test#12
what do?
make a table to remember something...althought you can't remember all....but that is enough
Posted by Yu YuanMing 6 Jul 2004 14:24
Re: make a table to remember something...althought you can't remember all....but that is enough
Posted by ahmasoi 27 Jul 2004 13:43
I think we only remember 1 to 2^i this mean G(1,i) then
F(1,N]=F(1,2^i)+i-1+F(2^i+1,N) ==>
F(1,N)=G(1,i)+i-1+F(2^i+1,N) while the last F(2^i+1,N)=F(1,N-2^i-1) and so on
certainly f(1,1)=0;
Re: Dymanic Programing.
Posted by Chidori 14 Nov 2005 21:18
I just use something like low_bit and calc the answer easily in logN time. You may use Abs(Dis(1,A) - Dis(1,B)) it is a good way to solve this problem.

Sorry for my poor English.

Edited by author 14.11.2005 21:19
Re: Dymanic Programing.
Posted by Piratek-(akaDK) 30 Jul 2008 23:44
15 strings - And AC - Cool!!! - time 0.015
Re: make a table to remember something...althought you can't remember all....but that is enough
Posted by Snayde 4 May 2013 19:11


Edited by author 04.05.2013 19:28