UVa 10405 - Longest Common Subsequence

10405 - Longest Common Subsequence

 * http://acm.uva.es/p/v104/10405.html

Summary
Given two strings, find the Longest Common Subsequence.

Explanation
Textbook Dynamic Programming problem. No tricks to it.

Gotchas
The input includes some blank lines.

Input
a1b2c3d4e zz1yy2xx3ww4vv abcdgh aedfhr abcdefghijklmnopqrstuvwxyz a0b0c0d0e0f0g0h0i0j0k0l0m0n0o0p0q0r0s0t0u0v0w0x0y0z0 abcdefghijklmnzyxwvutsrqpo opqrstuvwxyzabcdefghijklmn

Output
4 3 26 14