#include <bits/stdc++.h>
using namespace std;
#define f(i,k,n) for(int i=k; i<n; i++)
#define ll long long
const int inf = INT_MAX;
void solve()
{
int n;
cin>>n;
set<string> a;
string x;
f(i,0,n)
{
cin>>x;
a.insert(x);
}
int s=a.size()-1;
int c=1;
f(i,0,n-s) c*=(26-s-i);
cout<<c;
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int t=1;
//cin>>t;
while(t--) solve();
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1828 KiB | ||||
2 | Accepted | 3ms | 2060 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 3ms | 2280 KiB | ||||
4 | Accepted | 3ms | 2628 KiB | ||||
5 | Accepted | 3ms | 2436 KiB | ||||
subtask3 | 20/20 | ||||||
6 | Accepted | 3ms | 2648 KiB | ||||
7 | Accepted | 2ms | 2640 KiB | ||||
8 | Accepted | 3ms | 2768 KiB | ||||
9 | Accepted | 3ms | 3000 KiB | ||||
10 | Accepted | 3ms | 3204 KiB | ||||
11 | Accepted | 2ms | 3204 KiB | ||||
subtask4 | 30/30 | ||||||
12 | Accepted | 3ms | 3288 KiB | ||||
13 | Accepted | 2ms | 3288 KiB | ||||
14 | Accepted | 3ms | 3420 KiB | ||||
15 | Accepted | 2ms | 3492 KiB | ||||
16 | Accepted | 2ms | 3592 KiB | ||||
17 | Accepted | 2ms | 3388 KiB | ||||
subtask5 | 40/40 | ||||||
18 | Accepted | 2ms | 3492 KiB | ||||
19 | Accepted | 2ms | 3396 KiB | ||||
20 | Accepted | 2ms | 3404 KiB | ||||
21 | Accepted | 3ms | 3632 KiB | ||||
22 | Accepted | 3ms | 3744 KiB | ||||
23 | Accepted | 2ms | 3824 KiB | ||||
24 | Accepted | 3ms | 4060 KiB |