fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <algorithm>
  4.  
  5.  
  6. int main()
  7. {
  8. std::string alphabet = "abcdefghijklmnopqrstuvwxyz";
  9. std::string keyword = "sabbatical";
  10. alphabet.erase(
  11. std::remove_if(alphabet.begin(), alphabet.end(), [&keyword](char c)
  12. {return keyword.find(c) != std::string::npos;}),
  13. alphabet.end()
  14. );
  15. std::cout << keyword << alphabet;
  16. }
  17.  
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
sabbaticaldefghjkmnopqruvwxyz