标签:res class char color lse 分类 for oem str
Sample Input
sequence subsequence
person compression
VERDI vivaVittorioEmanueleReDiItalia
caseDoesMatter CaseDoesMatter
Sample Output
Yes
No
Yes
No
POJ题目分类 串。
水题, 但Yes错写成YES, No错写成NO WA了好几次
const int maxn = 1e5 + 24;
char a[maxn], b[maxn];
int main()
{
//freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
while(~scanf("%s%s", a, b)) {
int x = strlen(a), y = strlen(b);
int i, j;
for(i = 0, j = 0; i < x && j < y; j++) i += (a[i] == b[j]);
if(i == x) puts("Yes");
else puts("No");
}
return 0;
}
标签:res class char color lse 分类 for oem str
原文地址:https://www.cnblogs.com/000what/p/11552529.html