#C2601. Minimum Unique Heights

    ID: 45936 Type: Default 1000ms 256MiB

Minimum Unique Heights

Minimum Unique Heights

Given a positive integer \(n\) and a list of \(n\) integers representing the heights of books, your task is to compute the number of distinct heights present in the list. Mathematically, if the list is \(a_1, a_2, \dots, a_n\), you need to determine the value of

\[ \text{result} = \left|\{a_i : 1 \le i \le n\}\right| \]

This problem tests your ability to handle sets and count unique elements efficiently.

inputFormat

The input is given via standard input (stdin) with the following format:

  • The first line contains a single integer \(n\) (\(1 \le n \le 10^5\)), which is the number of books.
  • The second line contains \(n\) space-separated integers, where each integer represents the height of a book (each height is between \(1\) and \(10^9\)).

outputFormat

Output a single integer to standard output (stdout), which is the number of unique heights found in the list.

## sample
1
5
1

</p>