#include <iostream> #include <set> using namespace std; int main() { string str; while (cin >> str) { // 本题实质是去重字符串中的重复的字符; set<char> ch_set(str.begin(), str.end()); cout << ch_set.size() << endl; } }
#include <iostream> #include <set> using namespace std; int main() { string str; while (cin >> str) { // 本题实质是去重字符串中的重复的字符; set<char> ch_set(str.begin(), str.end()); cout << ch_set.size() << endl; } }