#C12464. Count Unique Elements
Count Unique Elements
Count Unique Elements
You are given an array of integers. Your task is to count the number of unique elements within the array.
The array is unsorted and may contain duplicates. Your solution should read the input from standard input (stdin) and write the result to standard output (stdout).
Note: The first line of the input is an integer n which denotes the number of elements in the array. The second line contains n space-separated integers.
You must implement your solution so that it passes all provided test cases.
inputFormat
The input consists of two lines:
- The first line contains an integer n representing the number of elements in the array.
- The second line contains n space-separated integers.
outputFormat
Output a single integer representing the number of unique elements in the array.
## sample5
1 2 3 4 5
5