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:水过(附代码)(修改后)In Reply To:水过(附代码) Posted by:spb3732 at 2012-12-24 20:35:53 #include<cstdio> #include<cstring> using namespace std; const int STRLEN=100001; char strS[STRLEN]; char strT[STRLEN]; int main() { while(scanf("%s%s",strS,strT)!=EOF) { int nTIndex=0; int nSIndex=0; while(strT[nTIndex]!='\0' && strS[nSIndex]!='\0') { if(strT[nTIndex++]==strS[nSIndex]) { nSIndex++; } } if(strS[nSIndex]=='\0') 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