Codeforces 1077F2 Pictures with Kittens (hard version)——单调队列优化dp
题意:从n个数中选x个,要求任意连续k个必须有数被选中,问最后x个数的和最大是多少1usingnamespacestd;constintmaxn=5010;typedeflonglongll;constllINF=1e14;intn,K,x,a[maxn];lldp[maxn][maxn],que[maxn];intmain(){scanf("%d%d%d",&n,&K,&x);for(inti=