#CCBCHBAHAI0000108. Number Frequence
Number Frequence
Number Frequence
Source: beecrowd
Version: Phuoc Hung OJ Extended
Problem
Given integers with , define . For every value with positive frequency, print the value and its count in increasing order of the value. The small value domain is intended to be handled with a frequency array.
Input
The first line contains . The second line contains integers. No value occurs more than 20 times.
Output
For each present value , print exactly v aparece f(v) vez(es) in increasing order.
Subtask
Subtask 1 (20 points): .
Subtask 2 (30 points): .
Subtask 3 (50 points): , , each value occurs at most 20 times.
Example
Input
7
8 10 8 260 4 10 10
Output
4 aparece 1 vez(es)
8 aparece 2 vez(es)
10 aparece 3 vez(es)
260 aparece 1 vez(es)
Explanation
The present values are 4, 8, 10, and 260 with frequencies 1, 2, 3, and 1.