C - 文字列の書き換え
解説
/
入力は以下の形式で標準入力から与えられる。
実行時間制限: 2 sec / メモリ制限: 256 MB
Problem Statement
すぬけ君は、新年のプレゼントに文字列 s をもらった。以下の操作を繰り返すことで s をすぬけ君の好きな文字列 t にできるかどうか判定せよ。
操作: s から文字を一つ選び、その直後に選んだ文字とは異なる文字を一つ挿入する。
Constraints
- 1 \leq |s| \leq |t| ≤ 5000
- s, t は英小文字のみからなる
Input Format
s t
Output Format
Yes
または No
と出力せよ。
Sample Input 1
snuke snukent
Sample Output 1
Yes
Sample Input 2
snuke ssnuke
Sample Output 2
No