//g++ 2.cpp -std=c++14 -O2 -I . #include using namespace std; #include using namespace atcoder; using ll = long long; using ld = long double; using vi = vector; using vvi = vector; using vll = vector; using vvll = vector; using vld = vector; using vvld = vector; using vst = vector; using vvst = vector; #define fi first #define se second #define pb push_back #define pq_big(T) priority_queue,less> #define pq_small(T) priority_queue,greater> #define all(a) a.begin(),a.end() #define rep(i,start,end) for(ll i=start;i<(ll)(end);i++) #define per(i,start,end) for(ll i=start;i>=(ll)(end);i--) #define uniq(a) sort(all(a));a.erase(unique(all(a)),a.end()) constexpr ll mod = 998244353; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int n; ll s; cin>>n>>s; ll inv_s=pow_mod(s,mod-2,mod); vll p(n); rep(i,0,n){ cin>>p[i]; p[i]*=inv_s; p[i]%=mod; } vll q={1},r={0}; rep(i,0,n){ vll a={1,p[i]}; vll b={0,(p[i]*p[i])%mod}; vll x=convolution(q,a); vll y=convolution(q,b); vll z=convolution(r,a); rep(i,0,z.size()){ if(i