#K40937. Counting Unique Spiciness Levels
Counting Unique Spiciness Levels
Counting Unique Spiciness Levels
You are given a number of test cases. In each test case, you have N burgers with their associated spiciness levels. You are also given two integers L and R, which represent the lower and upper bounds of a spiciness range, respectively.
Your task is to determine the number of unique spiciness levels that lie within the range \( [L, R] \) (inclusive) for each test case.
Input Format: The input is read from stdin
as described in the input section.
Output Format: For each test case, output a single integer on a new line indicating the count of unique spiciness levels in the specified range.
inputFormat
The first line of input contains an integer T representing the number of test cases. The description of T test cases follows.
- For each test case, the first line contains three space-separated integers: N (the number of burgers), L (the lower bound of the spiciness range), and R (the upper bound of the spiciness range).
- The second line contains N space-separated integers representing the spiciness levels of the burgers.
outputFormat
For each test case, print a single integer on a new line — the number of unique spiciness levels that lie in the range \( [L, R] \) (inclusive).
## sample2
4 10 20
10 15 20 25
5 5 10
1 2 3 3 3
3
0
</p>