This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ref(a,b,c) for(int (a)=(b);(a)<=(c);++(a))
#define rep(a,b) for(int (a)=0;(a)<(b);++(a))
#define pb push_back
#define mp make_pair
const int mx=4500;
int n,m;
char a[mx][mx];
int main(){
ios_base::sync_with_stdio(0);cin.tie(0);
cin >> n >> m;
set <char> s;
for(int i=1;i<=n;++i){
for(int j=1;j<=m;++j){
cin >> a[i][j];
s.insert(a[i][j]);
}
}
cout << s.size()-1 << endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |