#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
string s1, s;
while (cin >> s1 >> s)
{
while (s1 != "")
{
size_t position = s.find(s1[0]);
if (position != string::npos)
{
s.erase(0, position + 1);
s1.erase(0, 1);
}
else
{
cout << "No" << endl;
break;
}
}
if (s1 == "")
cout << "Yes" << endl;
}
return 0;
}
UVa10340 - All in All
最新推荐文章于 2024-09-06 10:38:06 发布