| ||||||||||
| 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 | |||||||||
被自己蠢哭,没看清大小写haha~~~
#include<cstdio>
#include<string>
#include<cstring>
#include<iostream>
using namespace std;
signed main(void) {
ios::sync_with_stdio(false);
string str1, str2;
while (cin >> str1 >> str2) {
int len1 = str1.length();
int len2 = str2.length();
for (int i = 0, j = 0;;) {
if (str1[i] == str2[j] && ++i == len1) {
printf("Yes\n");
break;
}
if (++j == len2) {
printf("No\n");
break;
}
}
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator