题解 | 最小循环节

最小循环节

https://www.nowcoder.com/practice/761f78551b854037abe412c2de615c05

#include <iostream>
#include <unordered_map>
using namespace std;

int main() {
    string str;
    getline(cin, str);
    unordered_map<char, int> hash;
    for (auto ch : str) {
        hash[ch] ++;
    }
    cout << hash.size() << endl;
}
// 64 位输出请用 printf("%lld")

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务