Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include <cmath>
  2. #include <cstdio>
  3. #include <vector>
  4. #include <iostream>
  5. #include <algorithm>
  6. #include <string>
  7. #include <map>
  8. using namespace std;
  9.  
  10. int main() {
  11.     string word;
  12.  
  13.     map<string, int> occurences;
  14.    
  15.     while(cin >> word) {
  16.         occurences[word]++;
  17.     }
  18.  
  19.     for (auto element : occurences) {
  20.         if (element.second == 1) {
  21.             std::cout << element.first << "\n";
  22.         }
  23.     }
  24.  
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement