Problem description

Recently, Anton has found a set. The set consists of small English letters. Anton carefully wrote out all the letters from the set in one line, separated by a comma. He also added an opening curved bracket at the beginning of the line and a closing curved bracket at the end of the line.

Unfortunately, from time to time Anton would forget writing some letter and write it again. He asks you to count the total number of distinct letters in his set.

Input

The first and the single line contains the set of letters. The length of the line doesn't exceed 1000. It is guaranteed that the line starts from an opening curved bracket and ends with a closing curved bracket. Between them, small English letters are listed, separated by a comma. Each comma is followed by a space.

Output

Print a single number — the number of distinct letters in Anton's set.

Examples

Input

{a, b, c}

Output

3

Input

{b, a, b, a}

Output

2

Input

{}

Output

0
解题思路:统计花括号中不同字母的个数,set容器水过!
AC代码:
 #include<bits/stdc++.h>
using namespace std;
int main(){
string s;set<char> se;
getline(cin,s);
for(int i=;s[i]!='\0';++i)
if(s[i]>='a'&&s[i]<='z')se.insert(s[i]);
cout<<se.size()<<endl;
return ;
}

Y - Anton and Letters的更多相关文章

  1. cf443A Anton and Letters

    A. Anton and Letters time limit per test 2 seconds memory limit per test 256 megabytes input standar ...

  2. Anton and Letters

    Anton and Letters time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...

  3. A. Anton and Letters

    time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standa ...

  4. Codeforces Round #253 (Div. 2) A. Anton and Letters

    题目很简单,只需要注意带空格的输入用getline即可 #include <iostream> #include <vector> #include <algorithm ...

  5. Codeforces Round 253 (Div. 2)

    layout: post title: Codeforces Round 253 (Div. 2) author: "luowentaoaa" catalog: true tags ...

  6. 数据分析---《Python for Data Analysis》学习笔记【03】

    <Python for Data Analysis>一书由Wes Mckinney所著,中文译名是<利用Python进行数据分析>.这里记录一下学习过程,其中有些方法和书中不同 ...

  7. 【枚举】Consonant Fencity @upcexam5110

    时间限制: 3 Sec 内存限制: 512 MB 题目描述 There are two kinds of sounds in spoken languages: vowels and consonan ...

  8. C 标准库 - ctype.h

    C 标准库 - ctype.h This header declares a set of functions to classify and transform individual charact ...

  9. ZZ:Solaris 10 软件包分析

    ZZ:Solaris 10 软件包分析 http://blog.chinaunix.net/uid-22759617-id-276756.html # Last updated: 2006-02-14 ...

随机推荐

  1. vue踩坑之路--点击按钮改变div样式

    有时候,我们在做项目的时候,想通过某个按钮来改变某个div样式,那么可以通过以下代码实现: <!DOCTYPE html> <html> <head> <me ...

  2. [CodeForces] 274E Mirror Room

    题意翻译 有一个n*m的格子图,其中有一些是黑色的,另一些为白色. 从某个白色格子的中心点向左上(NW),左下(SW),右上(NE),右下(SE)四个方向中的一个发出一束光线,若光线碰到黑色格子或者墙 ...

  3. isinstance、issubclass、反射

    一.isinstance.issubclass # isinstance(obj, cls) 检查obj是否是cls的对象 class A(object):pass a = A() print(isi ...

  4. mysql命令整理

    MySQL大小写通用. 一.常见用的mysql指令 1.show databases; #查看当前所有库 2.show tables; #查看所在库中的所有表 3.use 库名; #进入该库 4.sh ...

  5. CentOS7下安装ELK三件套

    ELK用于分布式收集,然后elasticsearch用于分析数据,在Kibana中可以查看数据.报表. 目前公司日志数据量暂时不使用elasticsearch集群,只是用的elasticsearch单 ...

  6. camera placement (paraview)

    # 'renderView1' is the view name# current camera placement for renderView1 renderView1.CameraPositio ...

  7. hdu2014 青年歌手大奖赛_评委会打分【C++】

    青年歌手大奖赛_评委会打分 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Tot ...

  8. bupt summer training for 16 #5 ——数据结构

    https://vjudge.net/contest/173780 A.假设 Pt = i,则由Ppi = i得 Ppt = t = Pi 所以就有 if Pt = i then Pi = t #in ...

  9. [TJOI2014] [Bzoj3996] 线性代数 [网络流,最小割]

    由原式,可以推出D=Σ(i=1,n,Σ(j=1,n,A[i]*A[j]*B[i][j]))-Σ(i=1,n,A[i]*C[i]) $D=\sum\limits_{i=1}^{n}\sum\limits ...

  10. [bzoj4010][HNOI2015]菜肴制作_贪心_拓扑排序

    菜肴制作 bzoj-4010 HNOI-2015 题目大意:给定一张n个点m条边的有向图,求一个toposort,使得:(1)满足编号为1的点尽量在前:(2)满足(1)的情况下编号为2的点尽量在前,以 ...