https://www.luogu.com.cn/problem/P3370
#include <iostream>
#include <cstdio>
#include <set>
using namespace std;
set<string> s;
long long qmi(int m, int k)
{
int res = 1, t = m;
while (k)
{
if (k&1) res = res * t;
t = t * t;
k >>= 1;
}
return res;
}
int read(){
int x = 0,f = 1;
char c = getchar();
while (c<'0'||c>'9') {
if (c=='-') {
f = -1;
}
c = getchar();
}
while (c>='0'&&c<='9') {
x = x*10+c-'0';
c = getchar();
}
return x*f;
}
int main()
{
int n = read();
while(n--){
string a;
cin>>a;
s.insert(a);
}
cout<<s.size()<<endl;
return 0;
}
/*
5
abc
aaaa
abc
abcc
12345
============
4
*/
网友评论