問題一覧 > 通常問題

No.182 Captivated by Novelty

レベル : / AI推定難易度 : 133 / 実行時間制限 : 1ケース 5.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 658
作問者 : 紙ぺーぱー
お気に入りにしたユーザー ProblemId : 485 / 自分の提出
問題文最終更新日: 2020-04-09 17:11:07
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 97 (順位表) の他の問題:

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もしくは右上の雲マークをクリックしてアカウントを作成してください。