#include using namespace std; int K,cost,AND,OR,MAX,MIN,i,j,k,n,a[10003],ANS[1003]; int main() { cin>>n>>K; for(i=0;i>a[i],ANS[i]=-1; for(i=0;i=K) for(k=i;k<=j;k++) ANS[k]=max(ANS[k],j-i+1); } } for(i=0;i