3476. Count Word Occurrences

Easy字符串普通指针排序

时间限制:1000 ms

内存限制:512 MiB

题面

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 000500~000.

样例

输入

aaa bbb ccc
ddd aaa bbb eee aaa

输出

aaa 3
bbb 2
ccc 1
ddd 1
eee 1