P3966 [TJOI2013] Word
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 $N$, indicating that the article has $N$ words.
Then the next $N$ lines each contain one word. Each word consists of lowercase letters $a\sim z$.
Output Format
Output $N$ integers, where the i-th line is the number of times the i-th word appears in the article.
Explanation/Hint
### Constraints
- For 30% of the testdata, the total length of all words does not exceed $10^3$.
- For 100% of the testdata, $1 \leq N \leq 200$, and the total length of all words does not exceed $10^6$.
Translated by ChatGPT 5