#include using namespace std; #define mp make_pair #define pb push_back #define len(a) (int)a.size() #define all(a) (a.begin(),a.end()) #define fi first #define sc second #define ort(x,y) (x+y)/2 #define endl '\n' #define FAST ios_base::sync_with_stdio(false); #define d1(x) cerr<<#x<<":"< pii; typedef pair,int> piii; struct node { lli mx,mn,orr,andd; }seg[N<<2]; int n,ans,ans1,ans2,k,ar[N],nar[N]; node build(int ind,int l,int r) { if(l==r) return seg[ind]={ar[l],ar[l],ar[l],ar[l]}; int mid=(l+r)/2; node t1=build(ind+ind,l,mid); node t2=build(ind+ind+1,mid+1,r); return seg[ind]={max(t1.mx,t2.mx),min(t1.mn,t2.mn),t1.orr | t2.orr,t1.andd & t2.andd}; } node get(int ind,int l,int r,int lw,int rw) { if(l>=lw && r<=rw) return seg[ind]; if(l>rw || r=k) for(int t=i;t<=j;t++) nar[t]=max(nar[t],j-i+1); } } for(int i=1;i<=n;i++) printf("%d\n",nar[i]); }