Count how many distinct values appear in each test case, using the easy-version constraints.
Unique Values
gfgYou are given an array of integers. Your task is to determine how many distinct values appear in the array.
For each test case, output the number of different elements present in the array.
This is the easy version of the problem, so the constraints are intended to allow straightforward counting-based solutions.
For each test case, print a single integer — the number of distinct values in the array.
Example 1
Input
3 5 1 2 2 3 1 4 7 7 7 7 6 4 5 4 6 5 7
Output
3 1 4
Explanation
Premium problem context
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.