Given the limits, those ideas are going to TLE I guess.
You can get an idea of a reduction that might work here :
http://www.cs.ucf.edu/courses/cap5510/fall2009/SeqAlign/LCS.efficient.pdf


2012/12/16 Faisal Dirie <[email protected]>

> Use brute-force methods to devise an algorithm, then and then, use dynamic
> programming techniques to tweak your code to achieve an optimized one,
> depending on what you want to do.
>
>
> On Sun, Dec 16, 2012 at 6:20 PM, Faisal Dirie <[email protected]> wrote:
>
>> Check the links below.
>>
>> http://www.cc.gatech.edu/~ninamf/Algos11/lectures/lect0311.pdf
>>
>>
>> http://en.wikibooks.org/wiki/Algorithm_implementation/Strings/Longest_common_subsequence
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to