code
#include<iostream>
#include<unordered_map>
using namespace std;
int main(){
unordered_map<char, int >mp;
string s;
cin>> s;
for(int i = 0; i < s.size(); i++){
mp[s[i]]++;
}
string tp = "";
for(int i = 0; i < s.size(); i++){
if(mp[s[i]] == 1) tp += s[i];
}
cout << tp;
return 0;
}
标签:string,删除,重复,元素,tp,++,int,mp,include
From: https://www.cnblogs.com/index-12/p/17296910.html