统计数字
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Description
某次科研调查时得到了n(n<=200000)个自然数,每个数均不超过1500000000(1.5*10^9)。已知不相同的数不超过10000个,现在需要统计这些自然数各自出现的次数,并按照自然数从小到大的顺序输出统计结果。
Input Format
输入文件count.in包含n+1行:
第1行是整数n,表示自然数的个数。
第2~n+1行每行一个自然数。
Output Format
输出文件count.out包含m行(m为n个自然数中不相同数的个数),按照自然数从小到大的顺序输出。
每行输出两个整数,分别是自然数和该数出现的次数,其间用一个空格隔开。
Sample
input
8
2
4
2
4
5
100
2
100
output
2 3
4 2
5 1
100 2
Hint
时间限制:
【20201022普转提模拟赛】
- Status
- Done
- Rule
- OI
- Problem
- 4
- Start at
- 2020-10-22 21:25
- End at
- 2020-10-22 21:30
- Duration
- 0.1 hour(s)
- Host
- Partic.
- 1