1029 旧键盘
/**
* 1.本题思路:遍历字符串s1,当当前字符s1[i]不在s2中
* 它的大写也不在ans中时,将当前字符的大写放入ans中
* 最后输出ans字符串即可
*
* 2.查找字符串a是否包含子串b,不是用strA.find(strB) > 0 而是 strA.find(strB) != string:npos
* 其中string:npos是个特殊值,说明查找没有匹配
*
* 3.参考博客:https://www.liuchuo.net/archives/559
*
* 4.吐槽:柳婼这道题的思路真的很简洁,比之前我用C写的强多了
* C++还是写算法还是很简洁的。
*/
#include <iostream>
#include <cctype>
using namespace std;
int main() {
string s1, s2, ans;
cin >> s1 >> s2;
for (int i = 0; i < s1.length(); i++)
if (s2.find(s1[i]) == string::npos && ans.find(toupper(s1[i])) == string::npos)
ans += toupper(s1[i]);
cout << ans;
return 0;
}