Advertisement
Guest User

Untitled

a guest
May 1st, 2018
2,610
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. #define sc(a) scanf("%d",&a)
  6. #define scs(a) scanf(" %s",a)
  7.  
  8.  
  9. typedef long long ll;
  10.  
  11. const int MAX = 1e3 + 11;
  12.  
  13. char in[MAX];
  14. set<int> s;
  15.  
  16. int main()
  17. {
  18.     int n;
  19.     sc(n);
  20.  
  21.     for(int i=0;i<n;++i)
  22.     {
  23.         scs(in);
  24.         int l = strlen(in);
  25.         int cur = 0;
  26.         for(int j=0;j<l;++j)
  27.             cur = cur | (1<<(in[j]-'a'));
  28.         s.insert(cur);
  29.     }
  30.  
  31.     cout<<s.size();
  32.  
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement