10340 - All in All
[cpp]描述:从t字符串中查找s字符串,查到,就输出Yes,否则,输出No
#include <cstdio>
#include <cstdlib>
#include <cstring>
char s[10010],t[1000010];
int main()
{
//freopen("a.txt","r",stdin);
while(scanf("%s%s",s,t)!=EOF)
{
int len_s=strlen(s),len_t=strlen(t),count=0;
for(int i=0; i<len_t; i++)
if(count<len_s)
{
if(t[i]==s[count]) count++;
}
else break;
if(count==len_s) printf("Yes\n");
else printf("No\n");
}
return 0;
}
补充:软件开发 , C++ ,