#include using namespace std; #define go_baby_go ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(0); #define pb push_back #define pp pop_back #define f first #define se second #define ll long long #define mp make_pair const int N=100100; const int mod=1e9+7; int a[N],ans[N]; int main(){ go_baby_go int n,k,i,j; cin>>n>>k; for(i=1;i<=n;i++){ cin>>a[i]; ans[i]=-1; } for(i=1;i<=n;i++){ int ors=0; int ands=a[i]; int mm=0; int mn=mod; int last=0; for(j=i;j<=n;j++){ ors=ors|a[j]; ands&=a[j]; mm=max(mm,a[j]); mn=min(mn,a[j]); int cost=(ors-ands)-(mm-mn); if(cost>=k) last=j; } for(j=last;j>=i;j--) ans[j]=max(ans[j],last-i+1); } for(i=1;i<=n;i++) cout<