Advertisement
chillurbrain

Доп. из 13. Спамер.

May 26th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <map>
  4. using namespace std;
  5. map<string,int> a;
  6. map<string,int>::iterator it;
  7. int main()
  8. {
  9.     int n,i;
  10.     string s;
  11.     cin>>n;
  12.     for(i=1;i<=n;i++)
  13.     {
  14.         cin>>s;
  15.         a[s]++;
  16.     }
  17.     for(it=a.begin();it!=a.end();it++)
  18.         if(it->second>1)
  19.             cout<<it->first<<endl;
  20.     // your code goes here
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement