0
点赞
收藏
分享

微信扫一扫

字符集合

Aliven888 2022-08-11 阅读 37


 

 

字符集合_ios

#include<iostream>
#include<string>
#include<unordered_set>
using namespace std;
int main()
{
string str;
while(cin>>str)
{
unordered_set<char>record;
string res;
for(int i=0;i<str.size();i++)
{
if(record.count(str[i])==false)
{
res+=str[i];
record.insert(str[i]);
}
}
cout<<res<<endl;
}
}

 

举报

相关推荐

0 条评论