Saleh127

Untitled

Jun 27th, 2020
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define test int t; cin>>t; while (t--)
  4. #define ll long long int
  5. #define fellow_junior ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  6. int main()
  7. {
  8. fellow_junior
  9. int t,i,j;
  10. while(cin>>t && t)
  11. {
  12. map<string,int>a;
  13. string x;
  14. for(i=0;i<t;i++)
  15. {
  16. cin>>x;
  17. a[x]++;
  18. }
  19. map<string,int>::iterator it;
  20. for(it=a.begin();it!=a.end();it++)
  21. {
  22. cout<<it->first;
  23. }
  24. cout<<endl;
  25. }
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment