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 |
千万要注意了。。。Yes写成了YES。。。。AC代码 #include<iostream> #include<string.h> #include<string> using namespace std; int main() { string s; string t; while(cin>>s>>t) { int i,j; int len_of_s=s.length(); int len_of_t=t.length(); for(i=0,j=0;i<len_of_s&&j<len_of_t;) { if(s[i]==t[j]) i++; j++; } if(i==len_of_s)cout<<"Yes"<<endl; else cout<<"No"<<endl; } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator