提交时间:2025-12-26 15:20:01

运行 ID: 78063

#include <iostream> #include <unordered_map> using namespace std; int main() { unordered_map<string, int> votes; string name; for (int i = 0; i < 10; ++i) { cin >> name; votes[name]++; } cout << "Li:" << votes["Li"] << endl; cout << "Zhang:" << votes["Zhang"] << endl; cout << "Fun:" << votes["Fun"] << endl; return 0; }