fork(1) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. string s;
  6. cin>>s;
  7. int n,a;
  8. a=s.size();
  9. cin>>n;
  10. while(n--)
  11. {
  12. char x;
  13. cin>>x;
  14.  
  15. for(int i=0;i<s.size();i++)
  16. {
  17. if(s[i]==x)
  18. s.erase(i,1);
  19. }
  20. }
  21. cout<<s;
  22. return 0;
  23. }
Success #stdin #stdout 0.01s 5440KB
stdin

wwwwwyyyyywwwwyyy
2
w
y
stdout
wwyywwy