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

Show all messages Hide all messages

Dymanic Programing. Yuanming YU, Frank 22 Jun 2004 18:49
Re: Dymanic Programing. paulo 5 Jul 2004 16:31
Time Limit Exceeded Test#12
what do?
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. Huang WenHao 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. NickSergeev[MSU MindCraft] 30 Jul 2008 23:44
15 strings - And AC - Cool!!! - time 0.015