//
// main.cpp
// Richard
//
// Created by 邵金杰 on 16/10/3.
// Mail:1016427040@qq.com or jasonshaosjj@gmail.com
// Copyright © 2016年 邵金杰. All rights reserved.
//
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const int maxn=100000+10;
char s[maxn],t[maxn];
int main()
{
while(scanf("%s%s",s,t)!=EOF)
{
int q1=0,q2=0;
int lens=(int)strlen(s);
int lent=(int)strlen(t);
while(q1<lens&&q2<lent)
{
if(s[q1]==t[q2]) {q1++;q2++;}
else q2++;
}
if(q1==lens) printf("Yes\n");
else printf("No\n");
}
return 0;
}
UVA 10340 All in All(水题)
最新推荐文章于 2023-11-28 21:17:33 发布