//双重Hash 可保证不重复 //空间较大 时间较慢 不易被卡 #include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<cmath> #include<algorithm> #define MOD1 233333339 #define MOD2 233333393 #define MOD3 233333939 #define base 233 #define ull unsigned long long using namespace std; ull n,ans=1,len; char s[10001]; struct uio{ ull a,b; }hash[10001]; bool cmp(uio x,uio y) { return x.a<y.a; } ull hash1(char s[]) { ull ans=0; for(ull i=0;i<len;i++) ans=(ans*base+(ull)s[i])%MOD1; return ans; } ull hash2(char s[]) { ull ans=0; for(ull i=0;i<len;i++) ans=(ans*base+(ull)s[i])%MOD2; return ans; } int main() { scanf("%llu",&n); for(ull i=1;i<=n;i++) { scanf("%s",s); len=strlen(s); hash[i].a=hash1(s); hash[i].b=hash2(s); } sort(hash+1,hash+n+1,cmp); for(ull i=2;i<=n;i++) if(hash[i].a!=hash[i-1].a&&hash[i].b!=hash[i-1].b) ans++; printf("%llu",ans); return 0; }