#P3966. [TJOI2013] 单词
[TJOI2013] 单词
Description
Xiao Zhang has been busy with his graduation project, so he has been reading papers. A paper is composed of many words, but Xiao Zhang noticed that a word may appear many times in the paper. He wants to know how many times each word appears in the paper.
Input Format
The first line contains an integer , indicating that the article has words.
Then the next lines each contain one word. Each word consists of lowercase letters .
Output Format
Output integers, where the i-th line is the number of times the i-th word appears in the article.
3
a
aa
aaa
6
3
1
Hint
Constraints
- For 30% of the testdata, the total length of all words does not exceed .
- For 100% of the testdata, , and the total length of all words does not exceed .
Translated by ChatGPT 5
京公网安备 11011102002149号