Advertisement
Guest User

Untitled

a guest
May 13th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include <iostream>
  2. #include <sstream>
  3. #include <vector>
  4.  
  5. #pragma GCC optimize ("O3")
  6.  
  7. int main()
  8. {
  9.     std::cout.sync_with_stdio(false);
  10.     std::cin.sync_with_stdio(false);
  11.     std::cin.tie(nullptr);
  12.  
  13.     std::ostringstream output;
  14.  
  15.     std::vector<bool> missing(26, true);
  16.  
  17.     std::string input;
  18.     std::cin >> input;
  19.     for (char ch : input)
  20.     {
  21.         missing[int(ch) - 97] = false;
  22.     }
  23.  
  24.     for (int i = 0; i < 26; i++)
  25.     {
  26.         if (missing[i])
  27.         {
  28.             output << char(i + 97);
  29.         }
  30.     }
  31.     std::cout << output.str() << std::endl;
  32.  
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement