Description

心結長阿蘇實在太常心結別人了,於是今天他決定要來好好統計一下他心結別人的情況。

已知每一次阿蘇和一個人(就叫他$k$好了)聊天,都會心結對方。

請幫他統計他心結每個人分別幾次?

Input Format

第一行有一個正整數$n$,代表阿蘇的聊天次數。

第二行會有$n$個整數,第$i$個整數$k_i$代表他和編號$k_i$的人聊天,並且心結了對方一次。

$0 < n <= 1000$

$0 <= k <= 100$

Output Format

請對於每個編號的人,請在一行輸出兩個整數

第一個整數為那個人的編號$k$

第二個整數為那個人被心結的次數

注意:請按照$k$的大小由小到大輸出。

Sample Input 1

5
1 2 3 4 5

Sample Output 1

1 1
2 1
3 1
4 1
5 1

Sample Input 2

5
99 12 23 23 99

Sample Output 2

12 1
23 2
99 2

Hints

注意範圍!

Subtasks

No. Testdata Range Score
1 0~99 100

TopCoder

餘切
$\Huge\text{freeh1}$

User's AC Ratio

100.0% (27/27)

Tags

Problem Source

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Memory Limit (RSS, KiB) Output Limit (KiB) Subtasks
0 1000 250000 250000 65536 1
1 1000 250000 250000 65536 1
2 1000 250000 250000 65536 1
3 1000 250000 250000 65536 1
4 1000 250000 250000 65536 1
5 1000 250000 250000 65536 1
6 1000 250000 250000 65536 1
7 1000 250000 250000 65536 1
8 1000 250000 250000 65536 1
9 1000 250000 250000 65536 1
10 1000 250000 250000 65536 1
11 1000 250000 250000 65536 1
12 1000 250000 250000 65536 1
13 1000 250000 250000 65536 1
14 1000 250000 250000 65536 1
15 1000 250000 250000 65536 1
16 1000 250000 250000 65536 1
17 1000 250000 250000 65536 1
18 1000 250000 250000 65536 1
19 1000 250000 250000 65536 1
20 1000 250000 250000 65536 1
21 1000 250000 250000 65536 1
22 1000 250000 250000 65536 1
23 1000 250000 250000 65536 1
24 1000 250000 250000 65536 1
25 1000 250000 250000 65536 1
26 1000 250000 250000 65536 1
27 1000 250000 250000 65536 1
28 1000 250000 250000 65536 1
29 1000 250000 250000 65536 1
30 1000 250000 250000 65536 1
31 1000 250000 250000 65536 1
32 1000 250000 250000 65536 1
33 1000 250000 250000 65536 1
34 1000 250000 250000 65536 1
35 1000 250000 250000 65536 1
36 1000 250000 250000 65536 1
37 1000 250000 250000 65536 1
38 1000 250000 250000 65536 1
39 1000 250000 250000 65536 1
40 1000 250000 250000 65536 1
41 1000 250000 250000 65536 1
42 1000 250000 250000 65536 1
43 1000 250000 250000 65536 1
44 1000 250000 250000 65536 1
45 1000 250000 250000 65536 1
46 1000 250000 250000 65536 1
47 1000 250000 250000 65536 1
48 1000 250000 250000 65536 1
49 1000 250000 250000 65536 1
50 1000 250000 250000 65536 1
51 1000 250000 250000 65536 1
52 1000 250000 250000 65536 1
53 1000 250000 250000 65536 1
54 1000 250000 250000 65536 1
55 1000 250000 250000 65536 1
56 1000 250000 250000 65536 1
57 1000 250000 250000 65536 1
58 1000 250000 250000 65536 1
59 1000 250000 250000 65536 1
60 1000 250000 250000 65536 1
61 1000 250000 250000 65536 1
62 1000 250000 250000 65536 1
63 1000 250000 250000 65536 1
64 1000 250000 250000 65536 1
65 1000 250000 250000 65536 1
66 1000 250000 250000 65536 1
67 1000 250000 250000 65536 1
68 1000 250000 250000 65536 1
69 1000 250000 250000 65536 1
70 1000 250000 250000 65536 1
71 1000 250000 250000 65536 1
72 1000 250000 250000 65536 1
73 1000 250000 250000 65536 1
74 1000 250000 250000 65536 1
75 1000 250000 250000 65536 1
76 1000 250000 250000 65536 1
77 1000 250000 250000 65536 1
78 1000 250000 250000 65536 1
79 1000 250000 250000 65536 1
80 1000 250000 250000 65536 1
81 1000 250000 250000 65536 1
82 1000 250000 250000 65536 1
83 1000 250000 250000 65536 1
84 1000 250000 250000 65536 1
85 1000 250000 250000 65536 1
86 1000 250000 250000 65536 1
87 1000 250000 250000 65536 1
88 1000 250000 250000 65536 1
89 1000 250000 250000 65536 1
90 1000 250000 250000 65536 1
91 1000 250000 250000 65536 1
92 1000 250000 250000 65536 1
93 1000 250000 250000 65536 1
94 1000 250000 250000 65536 1
95 1000 250000 250000 65536 1
96 1000 250000 250000 65536 1
97 1000 250000 250000 65536 1
98 1000 250000 250000 65536 1
99 1000 250000 250000 65536 1