提交时间:2026-01-04 15:42:37

运行 ID: 81232

#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; }