#include<bits/stdc++.h>
using namespace std;
const int MXN = 4000, INF = 1e9 + 5;
const int MOD = 1e9 + 7;
char arr[MXN][MXN];
void solve(){
int n, m; cin >> n >> m;
map<char, int> mp;
for(int i = 0; i < n; i++){
for(int j = 0; j < m; j++){
cin >> arr[i][j];
// cerr << arr[i][j];
if(arr[i][j] != '.') mp[arr[i][j]]++;
}
// cerr << endl;
}
cout << mp.size() << endl;
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(0);
cerr.tie(0);
// freopen("filename.in", "r", stdin);
// freopen("filename.out", "w", stdout);
int TC = 1;
// cin >> TC;
while(TC--) solve();
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
2904 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
2652 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
2652 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
2652 KB |
Output isn't correct |
6 |
Incorrect |
0 ms |
424 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
2652 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
2652 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
2652 KB |
Output isn't correct |
10 |
Incorrect |
1 ms |
2520 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
2652 KB |
Output isn't correct |
12 |
Incorrect |
2 ms |
2652 KB |
Output isn't correct |
13 |
Incorrect |
2 ms |
2652 KB |
Output isn't correct |
14 |
Incorrect |
2 ms |
2772 KB |
Output isn't correct |
15 |
Incorrect |
4 ms |
2908 KB |
Output isn't correct |
16 |
Incorrect |
5 ms |
2924 KB |
Output isn't correct |
17 |
Incorrect |
4 ms |
2800 KB |
Output isn't correct |
18 |
Incorrect |
2 ms |
2652 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
15448 KB |
Output isn't correct |
2 |
Incorrect |
18 ms |
8304 KB |
Output isn't correct |
3 |
Incorrect |
168 ms |
31596 KB |
Output isn't correct |
4 |
Incorrect |
40 ms |
12368 KB |
Output isn't correct |
5 |
Incorrect |
76 ms |
21476 KB |
Output isn't correct |
6 |
Incorrect |
193 ms |
31592 KB |
Output isn't correct |
7 |
Incorrect |
3 ms |
15964 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
15452 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
10 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
11 |
Incorrect |
2 ms |
15708 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
2652 KB |
Output isn't correct |
13 |
Incorrect |
19 ms |
8304 KB |
Output isn't correct |
14 |
Incorrect |
12 ms |
5600 KB |
Output isn't correct |
15 |
Incorrect |
15 ms |
5468 KB |
Output isn't correct |
16 |
Incorrect |
9 ms |
3164 KB |
Output isn't correct |
17 |
Incorrect |
45 ms |
12628 KB |
Output isn't correct |
18 |
Incorrect |
51 ms |
12628 KB |
Output isn't correct |
19 |
Incorrect |
40 ms |
12392 KB |
Output isn't correct |
20 |
Incorrect |
38 ms |
12112 KB |
Output isn't correct |
21 |
Incorrect |
90 ms |
21844 KB |
Output isn't correct |
22 |
Incorrect |
78 ms |
21588 KB |
Output isn't correct |
23 |
Incorrect |
87 ms |
18288 KB |
Output isn't correct |
24 |
Incorrect |
102 ms |
21588 KB |
Output isn't correct |
25 |
Incorrect |
206 ms |
31572 KB |
Output isn't correct |
26 |
Correct |
113 ms |
26728 KB |
Output is correct |
27 |
Incorrect |
155 ms |
31572 KB |
Output isn't correct |
28 |
Incorrect |
199 ms |
31572 KB |
Output isn't correct |
29 |
Incorrect |
191 ms |
31592 KB |
Output isn't correct |
30 |
Incorrect |
175 ms |
31056 KB |
Output isn't correct |
31 |
Incorrect |
180 ms |
24916 KB |
Output isn't correct |
32 |
Incorrect |
160 ms |
31712 KB |
Output isn't correct |