func_code_string: #include <bits/stdc++.h>   const int maxn = 100010, mod = 998244353;   int n, fac[maxn], ifac[maxn];   long long pw(long long a, int n = mod - 2) {     long long b = 1;     for (; n; n >>= 1) n& 1 ? b = b * a % mod : 1, a = a * a % mod;     return b;   }   struct edge {     int to;     edge* next;   } E[maxn * 2], *ne = E, *fir[maxn];   void link(int u, int v) {     *ne = (edge){v, fir[u]};     fir[u] = ne++;   }   int fa[maxn], siz[maxn], son[maxn];   void init(int i) {     siz[i] = 1;     for (edge* e = fir[i]; e; e = e->next)       if (e->to != fa[i]) {         fa[e->to] = i;         init(e->to);         if (siz[e->to] > siz[son[i]]) son[i] = e->to;         siz[i] += siz[e->to];       }   }   int cs[maxn];   std::vector<int> ps[maxn], f[maxn];   bool cmp(int i, int j) { return siz[i] < siz[j]; }   std::vector<int> add(std::vector<int> a, std::vector<int> b) {     std::vector<int> c;     for (int i = 0; i < a.size() || i < b.size(); i++)       c.push_back(((i < a.size() ? a[i] : 0) + (i < b.size() ? b[i] : 0)) % mod);     return c;   }   int ws[1 << 17];   void dft(int* a, int n, bool r = 0) {     int* w = ws + n / 2;     w[0] = 1;     w[1] = pw(3, (mod - 1) / n);     if (r) w[1] = pw(w[1]);     for (int i = 2; i < n / 2; i++) w[i] = 1ll * w[1] * w[i - 1] % mod;     for (int i = n / 2; --i;) ws[i] = ws[i * 2];     w = ws + 1;     for (int i = 0, j = 0, t; i < n; i++) {       if (i < j) t = a[i], a[i] = a[j], a[j] = t;       for (t = n / 2; (j ^= t) < t; t /= 2)         ;     }     for (int i = 1; i < n; w += i, i *= 2) {       for (int j = 0; j < n; j += i * 2) {         for (int k = 0, t; k < i; k++) {           t = 1ll * a[i + j + k] * w[k] % mod;           a[i + j + k] = (a[j + k] + mod - t) % mod;           a[j + k] = (a[j + k] + t) % mod;         }       }     }     if (r) {       long long I = pw(n);       for (int i = 0; i < n; i++) a[i] = a[i] * I % mod;     }   }   int A[1 << 17], B[1 << 17];   std::vector<int> mul(std::vector<int> a, std::vector<int> b) {     int n = a.size() - 1, m = b.size() - 1, N = 1;     while (N <= n + m) N *= 2;     for (int i = 0; i < N; i++) A[i] = i > n ? 0 : a[i], B[i] = i > m ? 0 : b[i];     dft(A, N);     dft(B, N);     for (int i = 0; i < N; i++) A[i] = 1ll * A[i] * B[i] % mod;     dft(A, N, 1);     std::vector<int> c;     for (int i = 0; i <= n + m; i++) c.push_back(A[i]);     return c;   }   std::pair<std::vector<int>, std::vector<int> > calc(       std::vector<std::vector<int> >& a, int l, int r) {     if (r - l == 1) return std::make_pair(a[l], a[l]);     int pl = l, pr = r, sl = 0, sr = 0;     while (pl < pr) sl < sr ? sl += a[pl++].size() - 1 : sr += a[--pr].size() - 1;     std::pair<std::vector<int>, std::vector<int> > fl = calc(a, l, pl),                                                    fr = calc(a, pl, r);     return std::make_pair(mul(fl.first, fr.first),                           add(fl.second, mul(fl.first, fr.second)));   }   void dc(int i) {     for (int o = i; o; o = son[o])       for (edge* e = fir[o]; e; e = e->next)         if (e->to != fa[o] && e->to != son[o]) dc(e->to);     std::vector<std::vector<int> > a;     for (int o = i; o; o = son[o]) {       int *cl = cs, *cr = cs;       std::vector<int>*pl = ps, *pr = ps;       for (edge* e = fir[o]; e; e = e->next)         if (e->to != fa[o] && e->to != son[o]) *cr++ = e->to;       std::sort(cs, cr, cmp);       for (int t = cr - cs; --t > 0;) {         std::vector<int>* p[2];         for (int j = 0; j < 2; j++) {           if (pl == pr || cl < cr && siz[*cl] < pl->size())             p[j] = f + *cl++;           else             p[j] = pl++;         }         *pr++ = mul(*p[0], *p[1]);       }       std::vector<int>&g = cl < cr ? f[*cl] : *pl, h;       h.push_back(0);       if (cl == cr && pl == pr)         h.push_back(1);       else         for (int j = 0; j < g.size(); j++) h.push_back(g[j]);       a.push_back(h);     }     f[i] = calc(a, 0, a.size()).second;     f[i][0] = 1;   }   int main() {     long long x;     scanf( %d%lld , &n, &x);     x %= mod;     for (int i = 1, u, v; i < n; i++)       scanf( %d%d , &u, &v), link(u, v), link(v, u);     for (int i = *fac = 1; i <= n; i++) fac[i] = 1ll * fac[i - 1] * i % mod;     ifac[n] = pw(fac[n]);     for (int i = n; i; i--) ifac[i - 1] = 1ll * ifac[i] * i % mod;     init(1);     dc(1);     int s = 0;     for (int i = 1, w = 1; i <= n; i++)       s = (s + 1ll * w * ifac[i - 1] % mod * f[1][i]) % mod,       w = w * (x + i) % mod;     printf( %d n , s);   }   