407772: GYM102892 1 Unique Elements

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

1. Unique Elementstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

You have an array of $$$n$$$ integers, and you want to find how many unique elements it has. An element is unique if it only appears once in the array.

For example, the array $$$[5, 7, 8, 5, 4, 4, 3]$$$ contains 3 unique elements: $$$7$$$, $$$8$$$, and $$$3$$$. $$$5$$$ is not a unique element, since it occurs twice in the array.

Input

The first line of input contains a single positive integer $$$n$$$ $$$(1 <= n <= 200000)$$$: the length of the array.

The next line contains $$$n$$$ space-separated integers: the array. The array elements will be between $$$1$$$ and $$$10^9$$$, inclusive.

Output

Output a single positive integer: the number of unique elements in the array.

Scoring

Full problem: 5 points

ExamplesInput
9
1 2 3 4 2 5 1 6 7
Output
5
Input
8
1 3 3 2 3 1 2 1
Output
0
Input
7
6 5 7 3 4 1 2
Output
7

加入题单

算法标签: