In this video, I solve the problem 'Distinct Numbers' from https://cses.fi/problemset/task/1621
Comment any better ideas!
The template I use can be found at https://cdn.samyok.us/usaco/template.....
I also stream at / oksammyoak , so follow me there! I stream everything from web design to Minecraft :)
==========================================
Here's the Problem Statement:
Time limit: 1.00 s Memory limit: 512 MB
You are given a list of n integers, and your task is to calculate the number of distinct values in the list.
Input
The first input line has an integer n: the number of values.
The second line has n integers x1,x2,�,xn.
Output
Print one integers: the number of distinct values.
Constraints
1n2105
1xi109
Example
Input:
5
2 3 2 2 3
Output:
2