HDU 1501 - Zipper
Problem : Given 3 strings s1, s2, s3. len(s1)+len(s2)=len(s3). Output whether s1 and s2 can be the un-overlaping sub sequence of s3.
Solution : Denote f[i][j], if s1[1..i], s2[1..j] can be the un-overlaping sub sequence of s3[1..i+j]. Then f[i][j]= (f[i-1][j]==1 and s1[i]==s3[i+j]) or (f[i][j-1]==1 and s2[j]==s3[i+j]).