/*
* Created: 2022-06-05 19:50
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
using namespace chrono;
// using namespace atcoder
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long long ll;
typedef long double ld;
const ll inf = 1e18;
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vll vector<ll>
#define rep(i, a, b) for(int i = (a);i<(b);i++)
#define repn(i, a, b) for(int i = (a);i>=(b);i--)
#define ss second
#define ff first
#define mkp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end()
template<typename T>
auto operator<<(ostream &os, T&v)->decltype(v.begin(), os){
os << "[";
int f = 0;
for(auto i:v) {
if(f++)os << ", ";
os << i;
}
os << "]";
return os;
}
template<typename F, typename S>
ostream& operator<<(ostream &os, pair<F, S> const &p) {
return os << "(" << p.first << ", " << p.second << ")";
}
ostream& operator<<(ostream &os, string& s) {
for(char i:s){
os << i;
}
return os;
}
void debug(){}
template<typename T, typename... V>
void debug(T t, V... v) {
cerr << t;
if(sizeof...(v)) {
cerr << ", "; debug(v...);
}
}
#ifdef LOCAL
#define dbg(x...) cerr << "[" << #x << "]: " << "["; debug(x); cerr << "]\n";
#else
#define dbg(x...)
#endif
void solve() {
int n, m;cin >> n >> m;
char c;
set<char> s;
for(int i = 0;i<n;i++) {
for(int j = 0;j<m;j++) {
cin >> c;
if(c!='.')s.insert(c);
}
}
cout<<s.size();
}
int main () {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t = 1;
//~ cin >> t;
while(t--) {
solve();
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
468 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
320 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
4 |
Incorrect |
4 ms |
472 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
336 KB |
Output isn't correct |
6 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
8 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
332 KB |
Output isn't correct |
11 |
Incorrect |
2 ms |
344 KB |
Output isn't correct |
12 |
Incorrect |
3 ms |
404 KB |
Output isn't correct |
13 |
Incorrect |
2 ms |
340 KB |
Output isn't correct |
14 |
Incorrect |
2 ms |
340 KB |
Output isn't correct |
15 |
Incorrect |
6 ms |
456 KB |
Output isn't correct |
16 |
Incorrect |
6 ms |
468 KB |
Output isn't correct |
17 |
Incorrect |
7 ms |
556 KB |
Output isn't correct |
18 |
Incorrect |
4 ms |
468 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
2 |
Incorrect |
27 ms |
1704 KB |
Output isn't correct |
3 |
Incorrect |
229 ms |
15920 KB |
Output isn't correct |
4 |
Incorrect |
56 ms |
3972 KB |
Output isn't correct |
5 |
Incorrect |
118 ms |
9004 KB |
Output isn't correct |
6 |
Incorrect |
241 ms |
15908 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
340 KB |
Output isn't correct |
10 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
13 |
Incorrect |
24 ms |
1708 KB |
Output isn't correct |
14 |
Incorrect |
15 ms |
1204 KB |
Output isn't correct |
15 |
Incorrect |
19 ms |
1208 KB |
Output isn't correct |
16 |
Incorrect |
11 ms |
852 KB |
Output isn't correct |
17 |
Incorrect |
66 ms |
4260 KB |
Output isn't correct |
18 |
Incorrect |
74 ms |
4132 KB |
Output isn't correct |
19 |
Incorrect |
59 ms |
3876 KB |
Output isn't correct |
20 |
Incorrect |
47 ms |
3624 KB |
Output isn't correct |
21 |
Incorrect |
127 ms |
9384 KB |
Output isn't correct |
22 |
Incorrect |
121 ms |
9004 KB |
Output isn't correct |
23 |
Incorrect |
128 ms |
7844 KB |
Output isn't correct |
24 |
Incorrect |
133 ms |
9120 KB |
Output isn't correct |
25 |
Incorrect |
311 ms |
16060 KB |
Output isn't correct |
26 |
Correct |
145 ms |
12200 KB |
Output is correct |
27 |
Incorrect |
251 ms |
15916 KB |
Output isn't correct |
28 |
Incorrect |
251 ms |
16056 KB |
Output isn't correct |
29 |
Incorrect |
239 ms |
15904 KB |
Output isn't correct |
30 |
Incorrect |
246 ms |
15564 KB |
Output isn't correct |
31 |
Incorrect |
210 ms |
10280 KB |
Output isn't correct |
32 |
Incorrect |
218 ms |
15920 KB |
Output isn't correct |