-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathK.cpp
31 lines (30 loc) · 821 Bytes
/
K.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*************************************************************************
> File Name: K.cpp
> Author: heheql
> Mail: [email protected]
> Created Time: 2017年08月16日 星期三 17时13分32秒
************************************************************************/
#include <iostream>
#include <algorithm>
using namespace std;
const int maxn = 1e5 + 10;
int main()
{
freopen("input.txt", "r", stdin);
ios::sync_with_stdio(false);
int n;
cin >> n;
for(int i = 1; i <= n; i++) {
string str;
cin >> str;
int dp[26]={0},ans=0;
for(int j = 0; j<str.size() ; j++) {
if (!dp[str[j] - 'a']){
ans++;
dp[str[j] - 'a'] = 1;
}
}
cout << "Case #" << i << ": " << ans << endl;
}
return 0;
}