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...和No... 贡献了一次wa,本来可以一次ac的~ 献上代码,很简单得比较阿。 #include <iostream> #include <string.h> using namespace std; char a[100000],b[100000]; int main() { int m,n,i,j; while (scanf("%s%s",a,b)!=EOF) { j=0; m=strlen(a); n=strlen(b); for (i=0;i<n;i++) { if (b[i]==a[j]) { j++; } } if (j==m) 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