#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,unroll-loops")
#define bupol __builtin_popcount
//#define int long long
#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define lf (id<<1)
#define rg ((id<<1)|1)
#define md ((l+r)>>1)
using namespace std;
const int MAXN = 2e5+5;
const int MAXK = 205;
const int LOG = 20;
const int MOD = 1e9+7;
const int SQRT = 520;
const int INF = 1e9+10;
typedef pair<ll,ll> pii;
typedef pair<ll,pii> ipii;
int h, w;
char s[410][410];
signed main(){
//ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
cin >> h >> w;
for(int i=0; i<h; i++){
for(int j=0; j<w; j++) cin >> s[i][j];
}
int ans = 0; set<char> x;
for(int i=0; i<h; i++){
for(int j=0; j<w; j++){
if(s[i][j]=='.') continue;
x.insert(s[i][j]);
}
}
cout << x.size() << '\n';
}
Compilation message
tracks.cpp: In function 'int main()':
tracks.cpp:33:9: warning: unused variable 'ans' [-Wunused-variable]
33 | int ans = 0; set<char> x;
| ^~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
7 ms |
856 KB |
Execution killed with signal 11 |
2 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
4 |
Runtime error |
5 ms |
860 KB |
Execution killed with signal 11 |
5 |
Incorrect |
3 ms |
476 KB |
Output isn't correct |
6 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
10 |
Incorrect |
3 ms |
348 KB |
Output isn't correct |
11 |
Incorrect |
2 ms |
484 KB |
Output isn't correct |
12 |
Incorrect |
4 ms |
348 KB |
Output isn't correct |
13 |
Incorrect |
3 ms |
348 KB |
Output isn't correct |
14 |
Incorrect |
3 ms |
344 KB |
Output isn't correct |
15 |
Runtime error |
7 ms |
860 KB |
Execution killed with signal 11 |
16 |
Runtime error |
7 ms |
860 KB |
Execution killed with signal 11 |
17 |
Runtime error |
7 ms |
860 KB |
Execution killed with signal 11 |
18 |
Runtime error |
5 ms |
860 KB |
Execution killed with signal 11 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
860 KB |
Execution killed with signal 11 |
2 |
Runtime error |
17 ms |
860 KB |
Execution killed with signal 11 |
3 |
Runtime error |
50 ms |
768 KB |
Execution killed with signal 11 |
4 |
Runtime error |
26 ms |
832 KB |
Execution killed with signal 11 |
5 |
Runtime error |
38 ms |
852 KB |
Execution killed with signal 11 |
6 |
Runtime error |
51 ms |
860 KB |
Execution killed with signal 11 |
7 |
Runtime error |
1 ms |
684 KB |
Execution killed with signal 11 |
8 |
Runtime error |
1 ms |
860 KB |
Execution killed with signal 11 |
9 |
Incorrect |
2 ms |
348 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
348 KB |
Output isn't correct |
11 |
Runtime error |
1 ms |
860 KB |
Execution killed with signal 11 |
12 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
13 |
Runtime error |
16 ms |
860 KB |
Execution killed with signal 11 |
14 |
Runtime error |
13 ms |
736 KB |
Execution killed with signal 11 |
15 |
Runtime error |
16 ms |
860 KB |
Execution killed with signal 11 |
16 |
Incorrect |
22 ms |
476 KB |
Output isn't correct |
17 |
Runtime error |
26 ms |
812 KB |
Execution killed with signal 11 |
18 |
Runtime error |
26 ms |
788 KB |
Execution killed with signal 11 |
19 |
Runtime error |
26 ms |
860 KB |
Execution killed with signal 11 |
20 |
Runtime error |
25 ms |
816 KB |
Execution killed with signal 11 |
21 |
Runtime error |
38 ms |
848 KB |
Execution killed with signal 11 |
22 |
Runtime error |
38 ms |
852 KB |
Execution killed with signal 11 |
23 |
Runtime error |
39 ms |
848 KB |
Execution killed with signal 11 |
24 |
Runtime error |
37 ms |
852 KB |
Execution killed with signal 11 |
25 |
Runtime error |
50 ms |
776 KB |
Execution killed with signal 11 |
26 |
Runtime error |
44 ms |
852 KB |
Execution killed with signal 11 |
27 |
Runtime error |
50 ms |
812 KB |
Execution killed with signal 11 |
28 |
Runtime error |
50 ms |
852 KB |
Execution killed with signal 11 |
29 |
Runtime error |
51 ms |
852 KB |
Execution killed with signal 11 |
30 |
Runtime error |
50 ms |
804 KB |
Execution killed with signal 11 |
31 |
Runtime error |
41 ms |
752 KB |
Execution killed with signal 11 |
32 |
Runtime error |
51 ms |
848 KB |
Execution killed with signal 11 |