No.182 Captivated by Novelty
タグ : / 解いたユーザー数 658
作問者 :
紙ぺーぱー
Problem Statement
kamipeipaa loves new things.
One day, kamipeipaa found $N$ integers $A_1, A_2, A_3,....,A_N$.
For an integer $A_i$, kamipeipaa figured that $A_i$ might have novelty if there is no $j$ other than $i$ such that $A_i = A_j$.
Please tell kamipeipaa how many integers satisfy the above condition.
Input
$N$ $A_1$ $A_2$ ... $A_N$
The first line contains $N(1 \le N \le 10^{5})$, the total number of numbers kamipeipaa found.
The second line contains the numbers kamipeipaa found, $A_1, A_2, ...., A_N(1 \le A_i \le 10^{9})$, separated by spaces.
Output
Print the number of integers satisfying the condition on one line. Do not forget the newline.
Sample
Sample 1
Input
5 1 1 2 3 3
Output
1
Only 2 seems to have novelty.
Sample 2
Input
6 1 1 1 1 1 1
Output
0
There may be cases where nothing seems to have any novelty at all.
Sample 3
Input
6 1 2 3 4 5 6
Output
6
There may be cases where everything seems to have novelty.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。