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> int main() { char a[500],b[500]; int thiss,count,i,j,la,lb,judge; while(scanf("%s%s",a,b)!=EOF) { la=strlen(a); lb=strlen(b); thiss=0; count=0; for(i=0;i<la;i++) { judge=0; j=thiss; while(j<lb&&judge==0) { if(a[i]==b[j]) { j++; thiss=j; judge=1; count++; } else j++; } } printf("%d\n",count); } return 0; } 结果是wrong answer Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator