#include <iostream>
#include<string>
#include<map>
using namespace std;
int main()
{
map<string, size_t> word_count;
string word;
while (cin >> word)
{
if (word == "QUIT")
break;
else
cout << word_count[word]++ << endl;
}
return 0;
}
单词计数
最新推荐文章于 2022-01-20 14:49:00 发布