#include using lint=long long; using real=long double; template T inverse(T a, T m){ T u=0,v=1; while(a!=0){ T t=m/a; m-=t*a;std::swap(a,m); u-=t*v;std::swap(u,v); } assert(m==1); return u; } template class modular { public: int value; constexpr modular() = default; constexpr modular(const modular&) = default; constexpr modular(modular&&) = default; modular&operator=(const modular&) = default; modular&operator=(modular&&) = default; templatemodular(const U&x){value= normalize(x);} template static int normalize(const U& x){ int v=static_cast(-mod()<=x&&xexplicit operator U()const{return static_cast(value);} constexpr static auto mod(){return T::value;} auto&operator+=(const modular&other) {if((value+=other.value)>=mod())value-=mod();return *this;} auto&operator-=(const modular& other){if((value-=other.value)<0)value+=mod();return *this;} template auto& operator+=(const U& other){return*this+=modular(other);} template auto& operator-=(const U& other){return*this-=modular(other);} auto operator-()const{return modular(-value);} auto&operator++(){return*this+=1;} auto&operator--(){return*this-=1;} auto operator++(int){modular result(*this);operator++();return result;} auto operator--(int){modular result(*this);operator--();return result;} template auto&operator*=(const modular&rhs){value=normalize(static_cast(value)*static_cast(rhs.value));return *this;} auto&operator/=(const modular&rhs){return*this*=modular(inverse(rhs.value, mod()));} }; templatestruct is_modular:std::false_type{}; templatestruct is_modular >:std::true_type{}; templateconstexpr bool is_modular_v=is_modular::value; template bool operator==(const modular& lhs, const modular& rhs){return lhs()==rhs();} templatebool operator==(const modular& lhs, U rhs){return lhs==modular(rhs);} templatebool operator==(U lhs, const modular& rhs){return modular(lhs)==rhs;} template bool operator!=(const modular& lhs, const modular& rhs){return !(lhs == rhs);} templatebool operator!=(const modular& lhs, U rhs){return !(lhs==rhs);} templatebool operator!=(U lhs, const modular& rhs){return !(lhs==rhs);} template modular operator+(const modular& lhs, const modular& rhs){return modular(lhs)+=rhs;} templatemodularoperator+(const modular& lhs,U rhs){return modular(lhs)+=rhs;} templatemodularoperator+(U lhs,const modular& rhs){return modular(lhs)+=rhs;} templatemodularoperator-(const modular& lhs,const modular& rhs){return modular(lhs)-=rhs;} templatemodularoperator-(const modular& lhs,U rhs){return modular(lhs)-=rhs;} templatemodularoperator-(U lhs,const modular& rhs){return modular(lhs)-=rhs;} templatemodularoperator*(const modular& lhs,const modular& rhs){return modular(lhs)*=rhs;} templatemodularoperator*(const modular& lhs,U rhs){return modular(lhs)*=rhs;} templatemodularoperator*(U lhs,const modular& rhs){return modular(lhs)*=rhs;} templatemodularoperator/(const modular& lhs,const modular& rhs){return modular(lhs)/=rhs;} templatemodularoperator/(const modular& lhs,U rhs){return modular(lhs)/=rhs;} templatemodularoperator/(U lhs,const modular& rhs){return modular(lhs)/=rhs;} template modularpower(const modular&a,U b) { assert(b>=0); modularx=a,ret=1; for (;b>0;b/=2){ if(b%2==1)ret*=x; x*=x; } return ret; } templateauto operator<<(std::ostream&os,const T&a)->std::enable_if_t,std::ostream&>{return os<auto operator>>(std::istream&is,T&a)->std::enable_if_t,std::istream&>{return is>>a.value;} constexpr int mod=1'000'000'007; using mint = modular, mod>>; templatestruct factorials{ long long size;std::vectorfact,finv; template factorials(U n):size(n),fact(n),finv(n){ fact.at(0)=1; for(U i=1;i=1;i--)finv.at(i-1)=finv.at(i)*i; } templateT operator()(U i)const{return fact.at(i);} templateT inv(U i)const{return finv.at(i);} templateT binom(U n,U k){assert(0<=n&&n>n>>m>>p; p=p/100; factorialsfact(n+m+1); std::vectora(n+1); mint now=power(p,m); for(lint i=0;ib(n+1); for(lint i=1;i<=n;i++)std::cin>>b.at(i); std::sort(b.rbegin(),b.rend()-1); std::partial_sum(b.begin(),b.end(),b.begin()); std::cout<