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 |
这个怎么回TLE? 真郁闷死了#include<stdio.h> #include<string.h> char s[100005],t[100005]; void main() { int i,j,k,mark; while(scanf("%s%s",s,t)==2) { k=0;mark=0; for(i=0;i<strlen(s);i++) { for(j=k;j<strlen(t);j++) { if(s[i]==t[j]) { k=j+1; break; } } if(j>=strlen(t)) { mark=1; printf("No\n"); break; } } if(mark==0) 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