#include using namespace std; #define boost std::ios::sync_with_stdio(false);cin.tie(0);cout.tie(0) #define ll long long #define S second #define F first #define FOR(i,a,b) for(i=(a) ; i<(b) ; i++) const ll mod = 1e9+7; int main() { boost; ll n,i,j,k,x,q; cin>>n>>k; vector a(n),ans(n,-1); FOR(i,0,n) cin>>a[i]; FOR(i,0,n) { ll aa=a[i],bb=a[i],cc=a[i],dd=a[i]; ll cost = cc-dd-aa+bb,z=1; if(cost>=k) ans[i]= max(ans[i],z); FOR(j,i+1,n) { aa = max(aa,a[j]); bb = min(bb,a[j]); cc |= a[j]; dd &= a[j]; cost = cc-dd-aa+bb; if(cost>=k){ FOR(x,i,j+1) ans[x]= max(ans[x],j-i+1); } } } FOR(i,0,n) cout<