题解

1 条题解

  • 0
    @ 2019-09-28 12:08:30

    std

    #include <iostream>
    #include <string>
    #include <map>
    #include <cctype>
    
    using namespace std;
    
    int n;
    string s;
    map<string, int> ma;
    map<string, int>::iterator it;
    
    int main() {
        cin >> n;
        for(int i = 1; i <= n; i++) {
            cin >> s;
            for(int j = 0; j < s.size(); j++) s[j] = tolower(s[j]);
            ma[s]++;
        }
        for(it = ma.begin(); it != ma.end(); it++)
            cout << it->first << ' ' << it->second << endl;
        return 0;
    }
    
  • 1

信息

ID
1005
难度
9
分类
(无)
标签
(无)
递交数
4
已通过
4
通过率
100%
上传者