题意
英文题自己看。。
解法
TKJ说随便做,看代码就好了,水题
#include<cstdio>
#include<cstring>
const int N=100005;
int a[N];
int n,k,b;
int mymin (int x,int y){
return x<y?x:y;}
int main()
{memset(a,0,sizeof(a));scanf("%d%d%d",&n,&k,&b);for (int u=1;u<=b;u++){int x;scanf("%d",&x);a[x]=1;}for (int u=1;u<=n;u++) a[u]+=a[u-1];int ans=1<<30;for (int u=1;u<=n-k+1;u++)//左端点 ans=mymin(ans,a[u+k-1]-a[u-1]);printf("%d\n",ans);return 0;
}