#include<cstdio>
#include<cstring>
char str1[100010],str2[100010];
int main()
{
while(~scanf("%s%s",str1,str2))
{
int len1=strlen(str1);
int len2=strlen(str2);
if(len1>len2)
{
printf("No\n");
continue;
}
int tot=0;
for(int i=0;i<len2;i++)
{
if(str2[i]==str1[tot])
tot++;
}
if(tot==len1)
printf("Yes\n");
else
printf("No\n");
}
return 0;
}
poj 1936 求一个串 是否为 另一个的自串(可以不连续)
最新推荐文章于 2021-05-18 00:36:46 发布