#include<iostream>
#include<fstream>
#include<cstdlib>
using namespace std;
ifstream fin("C:\\data9.in");
string s,t;
bool IsSubstring()
{
int i,j;
i=0;
for(j=0;j<t.length();++j)
{
if(t[j]==s[i])
{
++i;
}
}
return i==s.length();
}
int main()
{
while(fin>>s>>t)
{
if(IsSubstring())
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
system("pause");
return 0;
}
All In All
最新推荐文章于 2022-10-17 22:54:08 发布