其他分享
首页 > 其他分享> > 1093 字符串A+B (20 point(s))

1093 字符串A+B (20 point(s))

作者:互联网

#include <bits/stdc++.h>
using namespace std;

int main() {
	string A, B;
	map<char, int> vis;
	getline(cin, A);
	getline(cin, B);
	A += B;
	for(auto a: A) if(vis[a]++ == 0) cout << a;
}
#include <bits/stdc++.h>
using namespace std;

int main() {
	string A, B;
	map<char, int> vis;
	getline(cin, A);
	getline(cin, B);
	for(auto a: A) if(vis[a]++ == 0) cout << a;
	for(auto b: B) if(vis[b]++ == 0) cout << b;
}

标签:输出,20,1093,point,样例,cin,vis,字符串,getline
来源: https://www.cnblogs.com/Atl212/p/15321278.html