PAT 1033 旧键盘打字
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
bool f[N];
int main() {
string s;
getline(cin, s);
bool flag = false;
for (int i = 0; i < s.size(); i++) {
char c = s[i];
f[c] = true;
if (c == '+') flag = true;
if (c >= 'A' && c <= 'Z') {
f[c + 32] = true;
}
}
string s1;
cin >> s1;
bool is_cout = false;
for (int i = 0; i < s1.size(); i++) {
char c = s1[i];
if (!f[c]) {
if (c >= 'A' && c <= 'Z') {
if (!flag) {
cout << c;
is_cout = true;
}
} else {
cout << c;
is_cout = true;
}
}
}
if (!is_cout) cout << endl;
return 0;
}