1 条题解

  • 0
    @ 2026-3-20 14:02:26
    #include <bits/stdc++.h>
    using namespace std;
    
    int main() {
    	ios::sync_with_stdio(false); cin.tie(nullptr);
    	int n; cin >> n;
    	map<string, int> mp;
    	for (int i = 0; i < n;i ++) {
    		string s; cin >> s;
    		mp[s] ++;
    	}
    	for (auto it : mp) cout << it.first << ' ' << it.second << '\n';
    	return 0;
    }
    
    • 1

    信息

    ID
    212
    时间
    1000ms
    内存
    256MiB
    难度
    6
    标签
    (无)
    递交数
    18
    已通过
    11
    上传者