Advertisement
Saleh127

Untitled

Apr 26th, 2020
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int c,d,e,f=0,i,j,k,l;
  6. map<string,int>a;
  7. string b;
  8. cin>>c;
  9. for(i=0; i<c; i++)
  10. {
  11. cin>>b;
  12. a[b]++;
  13. }
  14. map<string,int>::iterator x;
  15. for(x=a.begin(); x!=a.end(); x++)
  16. {
  17. if(x->second!=0)
  18. f++;
  19. }
  20. printf("%d\n",f);
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement