|
|
back to boardDymanic 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 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. 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 |
|
|