Skip to content
C

Frequency Map

Easyjavapythonccppjavascript

Given an integer array, count how many times each distinct value occurs and report the counts in order of the values' first appearance.

Input Format

The first line contains an integer N. The second line contains N space-separated integers.

Output Format

For each distinct value, in order of first appearance, print a line v = k where v is the value and k is its count.

Input (stdin)

Output

Run your code to see output here...