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

Common Board

Who can give me a hint on problem 1183 or how I can improve my algortihm(+)
Posted by Nazarov Denis (nsc2001@rambler.ru) 8 Mar 2002 10:23
I have a dynamic algorithm  O(n^3).I use a structer
Answer   : array[1..100,1..100,1..100]of String;
But it too large! Answer[k,i,j] - is the regular sequence with
minimum length,in which copy(S,1,k) contained (where S - sequnce in
input)
I use FullSearch and get Accepted! But I need a good algorithm. Who can help me?(-)
Posted by Nazarov Denis (nsc2001@rambler.ru) 8 Mar 2002 10:41
> I have a dynamic algorithm  O(n^3).I use a structer
> Answer   : array[1..100,1..100,1..100]of String;
> But it too large! Answer[k,i,j] - is the regular sequence with
> minimum length,in which copy(S,1,k) contained (where S - sequnce in
> input)
Re: Who can give me a hint on problem 1183 or how I can improve my algortihm(+)
Posted by Tran Nam Trung (trungduck@yahoo.com) 8 Mar 2002 15:23
> I have a dynamic algorithm  O(n^3).I use a structer
> Answer   : array[1..100,1..100,1..100]of String;
> But it too large! Answer[k,i,j] - is the regular sequence with
> minimum length,in which copy(S,1,k) contained (where S - sequnce in
> input)
Just use DP : D[i,j] is the minimum number of additional chacracters
to obtain the right sequence. We can use this table to get the
minimum sequence.