#CCBCHBAHAI0000174. Số giá trị khác nhau trong miền 0..1000 (Distinct Values in the Range 0..1000)
Số giá trị khác nhau trong miền 0..1000 (Distinct Values in the Range 0..1000)
Distinct Values in the Range 0..1000
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem
You are given an array of integers, each in the range .
Compute the number of distinct values in the array, i.e. the size of
Input
- The first line contains .
- The second line contains .
Output
Print .
Subtasks
Subtask 1 (20 points): and .
Subtask 2 (30 points): and .
Subtask 3 (50 points): and .
Example
Input
8
0 7 7 1000 0 5 5 9
Output
5
Explanation
The distinct values are {0,5,7,9,1000}, hence the answer is 5.