forked from 21171-somesh/CodeforcesSolutions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path152C.cpp
More file actions
44 lines (40 loc) · 881 Bytes
/
152C.cpp
File metadata and controls
44 lines (40 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//21171_somesh || asomesh999
//AC
#include<bits/stdc++.h>
using namespace std;
#define fr(i,a,b) for(long long i=a;i<b;i++)
#define io ios::sync_with_stdio(false);cin.tie(NULL);
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
long int mod=1000000007;
int main()
{
io
#ifdef SOMU
clock_t startTime = clock();
freopen("input.txt","r",stdin);
#endif
int n, m;
cin >> n >> m;
vector<vector<char>> mat(n, vector<char>(m));
unordered_map<char, int> mp[m];
fr(i, 0, n) {
fr(j, 0, m) {
cin >> mat[i][j];
mp[j][mat[i][j]]++;
}
}
ll ans = 1;
fr(i, 0, m) {
ans = (ans * mp[i].size()) % mod;
}
cout << ans;
#ifdef SOMU
cerr << endl <<setprecision(20)<< double( clock() - startTime ) / (double)CLOCKS_PER_SEC<< " seconds." << endl;
#endif
return 0;
}