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" int solve(char *s1,char *s2) { int i1,i2,n; for(i1=0,i2=0;s1[i1]!='\0';i1++,i2++){ while(s1[i1]!=s2[i2]){ if(s2[i2]=='\0') return 0; i2++; } } return 1; } main() { int i1,i2,t,sum[10000]; char s1[10000],s2[10000]; for(i1=0; scanf("%s %s",s1,s2)!=EOF; i1++) sum[i1]=solve(s1,s2); for(i2=0;i2<i1;i2++){ if(sum[i1]==0) printf("No\n"); else printf("Yes\n"); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator