/* #include void self::main(){ LL(N); VL(N,a); vecs(N-1); fo(i,N-1){ if(a[i]>a[i+1])s[i]=0; if(a[i] using namespace std; namespace self{void main();void sub();void pp(auto&&...a);void ppe(auto&&...a);} int main(){cin.tie(nullptr)->sync_with_stdio(0);cout<__VA_ARGS__;fe(refs(__VA_ARGS__),e)e.get().resizes(n);lin(__VA_ARGS__) #define VL(n,...) RDVL(ll,n,__VA_ARGS__) #define fo(i,...) for(auto[i,i##stop,i##step]=for_range(0,__VA_ARGS__);iconstexpr auto for_range(T s,T b){T a=0;if(s)swap(a,b);return array{a-s,b,1-s*2};} void lin(auto&...a){(cin>>...>>a);} templatestruct pair{ A a;B b; pair()=default; pair(A a,B b):a(a),b(b){} auto operator<=>(const pair&)const=default; }; templateusing pack_back_t=tuple_element_t>; } namespace self{ templateclass FenwickTree{ public: ll n_; vectordata_; FenwickTree(ll n):n_(n),data_(n){} void add(ll i,T x){ assert(0<=i&&i0)res+=data_[r-1],r-=r&-r; while(l>0)res-=data_[l-1],l-=l&-l; return res; } }; } namespace self{ templateconcept vectorial=is_base_of_v::value_type>,remove_cvref_t>; templateistream&operator>>(istream&i,vector&v){fe(v,e)i>>e;return i;} templateconstexpr int depth=0; templateconstexpr int depth =depth+1; templatestruct core_t_helper{using type=T;}; templatestruct core_t_helper{using type=typename core_t_helper::type;}; templateusing core_t=core_t_helper::type; templatestruct vec; templatestruct hvec_helper{using type=vec::type>;}; templatestruct hvec_helper<0,T>{using type=T;}; templateusing hvec=hvec_helper::type; templatestruct vec:vector{ static constexpr int D=depth+1; using C=core_t; using vector::vector; vec(const auto&...a)requires(sizeof...(a)>=3){resizes(a...);} void resizes(const auto&...a){if constexpr(sizeof...(a)==D)*this=make(a...,C{});else*this=make(a...);} static auto make(ll n,const auto&...a){ if constexpr(sizeof...(a)==1)return vec(n,array{a...}[0]); else return vec(n,make(a...)); } ll size()const{return vector::size();} auto&emplace_front(auto&&...a){this->emplace(this->begin(),std::forward(a)...);return*this;} auto&emplace_back(auto&&...a){vector::emplace_back(std::forward(a)...);return*this;} vec slice(ll l,ll r)const{return lbegin()+l,this->begin()+r):vec{};} templateauto fold(auto&&f)const{ pairres{}; fe(*this,e){ if constexpr(!vectorial){ if(res.b)f(res.a,e); else res={e,1}; }else { } } return res; } auto min()const{return fold([](auto&a,auto b){if(b>vec stable_sort(F f={})const{vec v=*this;ranges::stable_sort(v,f);return v;} template>auto sort_from(F f={})const{ veco(size()); std::iota(o.begin(),o.end(),0); return o.stable_sort([&](ll i,ll j){return f((*this)[i],(*this)[j]);}); } auto pos_groups(C M)const{ assert(min()>=0); vec>res(M,0,0); fo(i,size())res[(*this)[i]].eb(i); return res; } ll inversion()const{ ll res=0; FenwickTrees(size()); ef(sort_from(),i){ res+=s.sum(0,i); s.add(i,1); } return res; } }; templaterequires(sizeof...(A)>=2)vec(const A&...a)->vec>>; } void self::pp(auto&&...a){const char*c="";((cout<s(N-1); fo(i,N-1){ if(a[i]>a[i+1])s[i]=0; if(a[i]