CF1225B1 TV Subscriptions (Easy Version)
题目描述
### 题意简述
给定长度为 $n$ 的序列 $a$,对于 $a_i(1\leq i \leq n)$ 有 $a_i\leq k$。请你找出一段长度为 $d$ 的区间,使得这段区间所包含的不同元素的数量最小。
输入格式
第一行一个正整数 $t(1\leq t \leq 100)$ —— 数据组数。
对于每组数据,第一行有三个正整数 $n,k,d(1\leq n,k \leq 100,1\leq d \leq n)$。
接下来一行 $n$ 个正整数 $a_1,a_2,a_3,···a_n$。
输出格式
对于每组数据,输出长度为 $d$ 的区间中最小的不同元素的数量。
翻译贡献者:Meatherm (U108949)
说明/提示
In the first test case to have an opportunity to watch shows for two consecutive days, you need to buy a subscription on show $ 1 $ and on show $ 2 $ . So the answer is two.
In the second test case, you can buy a subscription to any show because for each show you can find a segment of three consecutive days, consisting only of episodes of this show.
In the third test case in the unique segment of four days, you have four different shows, so you need to buy a subscription to all these four shows.
In the fourth test case, you can buy subscriptions to shows $ 3,5,7,8,9 $ , and you will be able to watch shows for the last eight days.