https://codeforces.net/contest/1225/my
include <bits/stdc++.h>
using namespace std; void solve(){ int n,k,d; cin>>n>>k>>d; vectorv(n); int minn =INT_MAX; for(auto &i: v) cin>>i; map<int,int>mp; if(n==1){ cout<<1<<endl; return; } for(int i=0;i<n-1;i++){ int sum=0; for(int g=i;g<d+i;g++) mp[v[g]]++; sum+=mp.size(); minn= min(sum,minn); mp.clear(); } cout<<minn<<'\n'; } int main() { int t; cin>>t; while(t--){ solve(); } }