#include <bits/stdc++.h>
using namespace std;
/*
---===ASCII help===---
'0' -> 48 '9' -> 57
'A' -> 65 'Z' -> 90
'a' -> 97 'z' -> 122
*/
const long long mod = 1e9 + 7;
void solve() {
int n, m; cin >> n >> m;
set<char> ans;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
char c; cin >> c;
if (c != '.') ans.insert(c);
}
}
cout << ans.size() << "\n";
}
int main() {
int t = 1;
//cin >> t;
while (t--) {
solve();
}
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |