0
点赞
收藏
分享

微信扫一扫

华为机试模拟题

zhaoxj0217 2022-03-11 阅读 74

1.字符集合

#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
string res;
while(cin>>s){
map<char,int> m;
for(auto c:s){
if(m[c]==0){
res.push_back(c);
m[c]++;
}
else
continue;
}
for(int i=0;i<res.size();i++)
cout<<res[i];
}
return 0;
}
举报

相关推荐

0 条评论