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 |
感觉好简单啊,是不是很多人想复杂了。。。。一次AC,0ms。。#include <stdio.h> char s[100001]; char t[100001]; int main(void){ int i,j; while(scanf("%s %s",s,t)!=EOF){ i=0; j=0; while(s[i]&&t[j]){ if(s[i]==t[j]){ i++; j++; }else{ j++; } } if(!s[i]){ 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