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 |
郁闷啊 为什么总是RE !!(code) 高手指教啊#include "stdio.h" #include "string.h" char s[10000],t[10000]; int ls,lt; int main() { int i,j; memset(s,0,sizeof(s)); memset(t,0,sizeof(t)); while(EOF!=scanf("%s",s)) { scanf ("%s",t); ls = strlen(s); lt = strlen(t); if(lt ==0)break; j=-1; for(i=0;i<ls;i++) { while(1) { j++; if (j == lt&&i!=ls-1) { printf("No\n"); goto NEXT; } if (s[i] == t[j]) { if (i == ls-1) { printf("Yes\n"); goto NEXT; } break; } } } NEXT:; memset(s,0,sizeof(s)); memset(t,0,sizeof(t)); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator