#K37077. Unique Stamp Collection
Unique Stamp Collection
Unique Stamp Collection
You are given a collection of stamps, each with a certain rarity level. Your task is to determine the minimum number of stamps required such that every distinct rarity level is represented exactly once. In other words, you need to count the number of unique rarity values present in the collection.
Mathematically, if the rarity levels are given as an array A of size n, you are to compute \[ \text{answer} = |\{ x : x \in A \}|, \] where \(|\cdot|\) denotes the cardinality of a set.
Read the input from standard input (stdin) and print the result to standard output (stdout).
inputFormat
The input consists of two lines. The first line contains an integer n representing the number of stamps. The second line contains n space-separated integers, where each integer represents the rarity level of a stamp.
outputFormat
Output a single integer, which is the count of unique rarity levels in the collection.
## sample7
1 2 3 3 2 1 4
4