描述 |
---|
Jg just memorizing words, suddenly he found that he didn't know a word, but he found the word like another word he knew, so he probably guessed the meaning of the word, thought really guessed right.Now give you these two words, tell me the two words are similar? |
输入 |
Given a sequence of N = < n1, n2,... , nm >,another sequence O = < o1, o2,... ok >,m<=n The word is not case sensitive |
输出 |
If there exists a strictly increasing sequence < i1, i2, ..., im > of indices of N such that for all j = 1,2,...,m, Nij =Oij. For example,N = < a, b, d, c > is a subsequence of O = < a, b, c, f, b, c > with index sequence < 1, 2, 4 >.If the index sequence length is more than half the length of O output "yes", otherwise output "no". |
样例输入 |
congratulate congratulations land grassland caoyuan ducaoyuan caoyuan caoyuanqingke |
样例输出 |
yes no yes yes |
HINT |
来源 |
XUJC OJ |