ll N,a[' # '],i;ll f(ll s,ll l,ll r){ll m;return s<0?0:(m=lower_bound(a+l,a+r,a[l]&-(1<