B3654 [语言月赛202208] 影子字符串
查看原帖
B3654 [语言月赛202208] 影子字符串
288627
ac_hh楼主2023/5/5 23:55
#include <iostream>
#include <algorithm>
#include <cstring>
#include <unordered_map>

using namespace std;

int main(){
	unordered_map<string,int> umap;
	string a;
	string res;

	while(cin >> a && a != "0"){
		if(umap.find(a) != umap.end())
			continue;
		else{
			umap[a] = 1;
			res += a;
		}
	}
	cout << res << endl;
	return 0;

}
2023/5/5 23:55
加载中...