#include<bits/stdc++.h>usingnamespace std;constint maxn =255;bool has[maxn];intmain(){
string ori, real;
cin >> ori >> real;for(int i =0; i < real.size();++i){int x =(int)real[i];if(islower(real[i])) real[i]=toupper(real[i]);
has[x]=true;}for(int i =0; i < ori.size();++i){int x =(int)ori[i];if(islower(ori[i])) ori[i]=toupper(ori[i]);if(has[x]==false){printf("%c", ori[i]);
has[x]=true;}}return0;}
T3 code:
#include<bits/stdc++.h>usingnamespace std;bool has[300];intmain(){
string s1, s2;
cin >> s1 >> s2;for(int i =0; i < s2.size();++i){char tmp =islower(s2[i])?toupper(s2[i]): s2[i];
has[tmp]=true;}for(int i =0; i < s1.size();++i){char tmp =islower(s1[i])?toupper(s1[i]): s1[i];if(has[tmp]==false){printf("%c", tmp);
has[tmp]=true;}}return0;}