| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
为什么错了呀?????#include<stdio.h>
#include<string.h>
char s[100010],t[100010];
int main()
{
int i,j,L,M;
while(scanf("%s%s",s,t)!=EOF)
{
L=strlen(s);
M=strlen(t);
if(L>M||((L==M)&&(strcmp(s,t)!=0)))
{
printf("No\n");
continue;
}
j=0;
int count=0;
for(i=0;i<L;i++)
{
while(s[i]!=t[j])
{
j++;
if(j>=M)
goto loop;
}
count++;
}
loop:;
if(count==L)
printf("Yes\n");
else
printf("No\n");
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator