好水啊,子串~
#include<iostream>
#include<string>
using namespace std;
int main()
{
string s,t;
while(cin>>s>>t)
{
bool flag=true;
int pos=0;
int pos1=-1;
for(int i=0;i<s.length();i++)
{
pos=t.find(s[i]);
if(pos!=string::npos)
{
t=t.substr(pos+1,t.size());
}
else
{
flag=false;
break;
}
}
if(flag)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
}