これは部分列でしょうか?

テキスト t と文字列 s が与えられたとき、ひとつの問いに答えてください:
t の一部の文字を削除し、残りをそのまま並べることで s を作ることはできるでしょうか?

入力

1 行目にテキスト t が与えられます (1 ≤ |t| ≤ )。2 行目に文字列 s が与えられます (1 ≤ |s| ≤ )。

出力

可能な場合は "Yes"、不可能な場合は "No" を出力してください。

入力
出力
hello, world! ello
Yes
hello, world! woo
No
hello, world! eoo
Yes
 

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue