#include using namespace std; vector a; vector r; int n,k; void costlyIntervals() { // Return a list of length n consisting of the answers int i,j,ma,mi,ori,andi,s,l,m; for(i=0;i=k && r[i]==-1) r[i]=1; for(j=i+1;j=k && r[i]=k) m=j-i+1; } if(s==1) { for(l=1;l> n >> k; for(int A_i = 0; A_i < n; A_i++){ cin >> l; a.push_back(l); r.push_back(-1); } costlyIntervals(); for (ssize_t i = 0; i < r.size(); i++) { cout << r[i] << "\n"; } return 0; }