// 这题有点意思了 改来改去的 / 其实一点意思都没有
#pragma comment(linker, "/STACK:1024000000,1024000000")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll inf = 0x3f3f3f3f3f3f3f3f;
#define show(a) cout<<#a<<" = "<<a<<endl
#define show2(b,c) cout<<#b<<" = "<<b<<" "<<#c<<" = "<<c<<endl
#define show3(a,b,c) cout<<#a<<" = "<<a<<" "<<#b<<" = "<<b<<" "<<#c<<" = "<<c<<endl
#define show4(a,b,c,d) cout<<#a<<" = "<<a<<" "<<#b<<" = "<<b<<" "<<#c<<" = "<<c<<" "<<#d<<" = "<<d<<endl
const int maxn = 10005;
#define LOCAL
int main() {
cin.tie(0);ios::sync_with_stdio(false);
string s, ss;
getline(cin, s);
getline(cin, ss); // //cin >> ss;!!!!!!!!!!!!!!!
int lens = s.size();
int lenss = ss.size();
int f[256] = {0}; // ASCII码在0~255之间
for(int i = 0; i < lenss; i++)
f[ss[i]] = 1;
for(int i = 0; i < lens; i++) {
if( !f[s[i]])
cout << s[i];
}
cout << endl;
}
/*
string str ("This is an example phrase.");
string::iterator it;
//第(1)种方法
str.erase (10,8);
cout << str << endl; // "This is an phrase."
//第(2)种方法
it=str.begin()+9;
str.erase (it);
cout << str << endl; // "This is a phrase."
//第(3)种方法
str.erase (str.begin()+5, str.end()-7);
cout << str << endl; // "This phrase."
*/
L1-011 两个getline ASCII码在0~255之间
最新推荐文章于 2024-05-24 10:47:41 发布