2022级统计计算机双学位《程序设计原理与C语言》上机作业

1057. Count Word Occurrences

单点时限: 1.0 sec

内存限制: 512 MB

Count the occurrences of different words in several lines, and output in alphabetical order.

Words can be separated with at least one of the \n, \t, (space).

Lowercase ascii letters only. Sum length of all words will not exceed $500~000$.

样例

Input
aaa bbb ccc
ddd aaa bbb eee aaa
Output
aaa 3
bbb 2
ccc 1
ddd 1
eee 1