Number of different elements
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given an array of N integers, your task is to find out how many distinct elements are present in the array.
Input
The first line contains the integer N, representing the number of elements in the array. The second line contains N integers, where each integer does not exceed 2000 in absolute value.
Output
Output the count of distinct elements in the array.
Examples
Input #1
Answer #1
Submissions 8K
Acceptance rate 47%