#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<string>
#include<cstring>
#include<cmath>
#include<map>
#define ll long long
using namespace std;
int mk[100000],h[256];
int main()
{
string s1,s2,ans;
cin>>s1>>s2;
for(int i = 0,j = 0;i<s2.length();i++)
{
while(s1[j]!=s2[i])j++;
mk[j++] = 1;
}
for(int i = 0;i<s1.length();i++)
{
if(s1[i]>='a'&&s1[i]<='z')s1[i]-=32;
if(!mk[i]&&!h[s1[i]])
{
h[s1[i]] = 1;
ans+=s1[i];
}
}
cout<<ans<<endl;
return 0;
}
pat1084 Broken Keyboard
最新推荐文章于 2020-10-10 19:15:20 发布