#PAT甲级1050
讲述的主要是字符串处理,可以使用map解决
#include <iostream>
#include <cstring>
#include <algorithm>
#include <map>
using namespace std;
string s1,s2;
int main(){
getline(cin,s1);
getline(cin,s2);
map<char,int>m;
for(int i = 0 ;i < s2.length(); i++){
m[s2[i]] = 1;
}for(int i = 0; i < s1.length(); i++){
if(m[s1[i]] == 0){
cout << s1[i];
}
}
return 0;
}
/*
They are students.
aeiou
*/
来源:CSDN
作者:这是小卢呀
链接:https://blog.csdn.net/qq_41581913/article/details/103940129