AcWing
  • 首页
  • 题库
  • 题解
  • 分享
  • 问答
  • 活动
  • 应用
  • 吐槽
  • 登录/注册

AcWing 1534. 字符串减法

作者: 作者的头像   fanfande ,  2021-02-19 14:08:03 ,  阅读 2


0


#include<iostream>
#include<string>
#include<unordered_set>

using namespace std;
string a,b;
unordered_set <char>  uni;
int main()
{

    getline(cin,a);
    getline(cin,b) ;
    for(auto s:b) uni.insert(s);
    string res;
     for(auto s:a)
      if(!uni.count(s))  res+=s;

    cout<<res<<endl;
    return 0;
}

0 评论

你确定删除吗?

© 2018-2021 AcWing 版权所有  |  京ICP备17053197号-1
联系我们  |  常见问题
AcWing
请输入登录信息
更多登录方式: 微信图标 qq图标
请输入绑定的邮箱地址
请输入注册信息