#include <iostream>
#include <bits/stdc++.h>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
//cout << (97 - '0');
// printf("%c", (97+'0'));
string str1, str2;
bool hashTable[128] = {false};
cin >> str1 >> str2;
int len1 = str1.length();
int len2 = str2.length();
for(int i = 0; i < len1; i++){
int j;
char c1, c2;
c1 = str1[i];
if(c1 >= 'a' && c1 <= 'z') c1 -= 32;
for(j = 0; j < len2; j++){
c2 = str2[j];
if(c2 >= 'a' && c2 <= 'z') c2 -= 32;
if(c1 == c2) break;
}
if(j == len2 && hashTable[c1] == false){
cout << c1;
hashTable[c1] = true;
}
}
return 0;
}
A1084_B1029 旧键盘 (20 分)
最新推荐文章于 2021-07-03 15:43:05 发布