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

时间:2014-06-21 14:29:06   收藏:0   阅读:200

题目很简单,只需要注意带空格的输入用getline即可

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <set>

using namespace std;

int main(){
    string str;
    getline(cin,str);
    set<char> a;
    for(int i= 1 ; i < str.length()-1; i+=3 ){
        a.insert(str[i]);
    }
    cout<<a.size()<<endl;
}

 

Codeforces Round #253 (Div. 2) A. Anton and Letters,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!