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<iostream> #include<string> #include<stdio.h> using namespace std; char s1[100000], s2[100000]; int main(int argc, char* argv[]) { while(scanf("%s",s1) == 1){ scanf("%s",s2); long len1 = strlen(s1); long len2 = strlen(s2); long i=0, j=0; for( ;i<len1 && j<len2; ++i){ if(len1 == len2)break; while(j < len2 && s1[i] != s2[j])j++; } if( i == len1 && j < len2)cout<<"Yes\n"; else cout<<"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