#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#pragma GCC optimize("-Ofast")
//#pragma GCC optimize("trapv")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.2,popcnt,abm,mmx,avx2,tune=native")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-funroll-loops")
using namespace std;
using namespace __gnu_pbds;
#define vi vector<int>
#define vll vector<ll>
#define vii vector<pair<int, int>>
#define vvi vector<vi>
#define vvii vector<vii>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define loop(_) for (int __ = 0; __ < (_); ++__)
#define forn(i, n) for (int i = 0; i < n; ++i)
#define pb push_back
#define f first
#define s second
#define sz(_) ((int)_.size())
#define all(_) _.begin(), _.end()
#define uni(_) unique(_)
#define lb lower_bound
#define ub upper_bound
#define si set<int>
#define ms multiset<int>
#define qi queue<int>
#define pq prioriry_queue<int>
#define mi map<int, int>
#define inc(i, l, r) for (int i = l; i <= r; i++)
#define dec(i, l, r) for (int i = l; i >= r; i--)
using lll = __int128;
using ll = long long;
using ld = long double;
const int N = 1e5 + 7;
const ll mod = 1e9 + 7;
const ll inf = 2e18;
auto ra = [] {char *p = new char ; delete p ; return ll(p) ; };
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count() * (ra() | 1));
typedef tree<pii, null_type, less<pii>, rb_tree_tag, tree_order_statistics_node_update> os;
__int128 read()
{
__int128 x = 0, f = 1;
char ch = getchar();
while (ch < '0' || ch > '9')
{
if (ch == '-')
f = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9')
{
x = x * 10 + ch - '0';
ch = getchar();
}
return x * f;
}
void print(__int128 x)
{
if (x < 0)
{
putchar('-');
x = -x;
}
if (x > 9)
print(x / 10);
putchar(x % 10 + '0');
}
bool cmp(__int128 x, __int128 y) { return x > y; }
int n, m;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
set<char> st;
cin >> n >> m;
loop(n * m)
{
char c;
cin >> c;
st.insert(c);
}
cout << sz(st) - 1;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
9 ms |
620 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
4 |
Incorrect |
5 ms |
492 KB |
Output isn't correct |
5 |
Incorrect |
3 ms |
364 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
512 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
404 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
364 KB |
Output isn't correct |
11 |
Incorrect |
2 ms |
364 KB |
Output isn't correct |
12 |
Incorrect |
3 ms |
364 KB |
Output isn't correct |
13 |
Incorrect |
3 ms |
364 KB |
Output isn't correct |
14 |
Incorrect |
5 ms |
408 KB |
Output isn't correct |
15 |
Incorrect |
7 ms |
620 KB |
Output isn't correct |
16 |
Incorrect |
9 ms |
620 KB |
Output isn't correct |
17 |
Incorrect |
8 ms |
620 KB |
Output isn't correct |
18 |
Incorrect |
5 ms |
620 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
364 KB |
Output isn't correct |
2 |
Incorrect |
36 ms |
1816 KB |
Output isn't correct |
3 |
Incorrect |
309 ms |
15980 KB |
Output isn't correct |
4 |
Incorrect |
93 ms |
4096 KB |
Output isn't correct |
5 |
Incorrect |
213 ms |
9196 KB |
Output isn't correct |
6 |
Incorrect |
300 ms |
15996 KB |
Output isn't correct |
7 |
Incorrect |
2 ms |
364 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
364 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
364 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
364 KB |
Output isn't correct |
11 |
Incorrect |
2 ms |
364 KB |
Output isn't correct |
12 |
Incorrect |
2 ms |
364 KB |
Output isn't correct |
13 |
Incorrect |
46 ms |
1900 KB |
Output isn't correct |
14 |
Incorrect |
24 ms |
1260 KB |
Output isn't correct |
15 |
Incorrect |
24 ms |
1260 KB |
Output isn't correct |
16 |
Incorrect |
16 ms |
1008 KB |
Output isn't correct |
17 |
Incorrect |
87 ms |
4348 KB |
Output isn't correct |
18 |
Incorrect |
120 ms |
4220 KB |
Output isn't correct |
19 |
Incorrect |
103 ms |
4060 KB |
Output isn't correct |
20 |
Incorrect |
72 ms |
3708 KB |
Output isn't correct |
21 |
Incorrect |
245 ms |
9452 KB |
Output isn't correct |
22 |
Incorrect |
182 ms |
9084 KB |
Output isn't correct |
23 |
Incorrect |
224 ms |
7932 KB |
Output isn't correct |
24 |
Incorrect |
221 ms |
9200 KB |
Output isn't correct |
25 |
Incorrect |
400 ms |
16112 KB |
Output isn't correct |
26 |
Incorrect |
216 ms |
12268 KB |
Output isn't correct |
27 |
Incorrect |
415 ms |
15996 KB |
Output isn't correct |
28 |
Incorrect |
316 ms |
15996 KB |
Output isn't correct |
29 |
Incorrect |
308 ms |
15980 KB |
Output isn't correct |
30 |
Incorrect |
352 ms |
15628 KB |
Output isn't correct |
31 |
Incorrect |
372 ms |
10364 KB |
Output isn't correct |
32 |
Incorrect |
438 ms |
15996 KB |
Output isn't correct |