分類:簡單字符串
題目鏈接:Uva10340-All in All
水題,按要求做即可
#include<iostream>
#include<cstring>
#include<string>
#include<algorithm>
#include<cstdio>
using namespace std;
const int maxn=100000+100;
char s[maxn],t[maxn];
int main()
{
while(scanf("%s %s",s,t)!=EOF)
{
int tot=0;
for(int i=0;i<strlen(t);i++)
{
if(t[i]==s[tot])
{
tot++;
}
}
if(tot==strlen(s))
{
printf("Yes\n");
}
else
{
printf("No\n");
}
}
return 0;
}