https://pintia.cn/problem-sets/994805260223102976/problems/994805292322111488
#include <iostream>
using namespace std;
int main(){
string s1, s2;
cin >> s1 >> s2;
int sub = 0, v[300] = {0};
for(int i = 0; i < s1.size(); i++){
if(s1[i] != s2[sub]){
if(s1[i] <= 'z' && s1[i] >= 'a' && !v[s1[i]]){
v[s1[i]]++;
v[s1[i]-'a'+'A']++;
cout << (char)(s1[i]-'a'+'A');
}
else if(s1[i] <= 'Z' && s1[i] >= 'A' && !v[s1[i]]){
v[s1[i]]++;
v[s1[i]-'A'+'a']++;
cout << s1[i];
}
else if(!v[s1[i]]){
v[s1[i]]++;
cout << s1[i];
}
}
else
sub++;
}
return 0;
}