Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cmath>
- #include <cstdio>
- #include <vector>
- #include <iostream>
- #include <algorithm>
- #include <map>
- using namespace std;
- int main() {
- map<string, int> words;
- string curr = "";
- while(cin >> curr){
- if(words.find(curr) == words.end()){
- words.insert({curr, 1});
- }else{
- words.at(curr)++;
- }
- }
- map<string, int> :: iterator itr;
- for(itr = words.begin(); itr != words.end(); itr++){
- if(itr->second == 1){
- cout << itr->first << endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement