简单的字符匹配 ,模拟就过了
#include<iostream>
#include<cstdio>
#include<string.h>
using namespace std;
char s[100010],t[100010];
int main()
{
int i,j;
while(scanf("%s %s",s,t)!=EOF)
{
int len1=strlen(s),len2=strlen(t);
j=0;
for(i=0;i<len2;i++)
{
if(t[i]==s[j])
j++;
}
if(j==len1)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
return 0;
}