#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; bool rcmp(int a, int b) { return a>b; } typedef long long LL; #define MOD 998244353 int expit(LL b, int e) { LL r=1; while(e) { if (e&1) { r*=b; r%=MOD; } b*=b; b%=MOD; e>>=1; } return r; } int bb[200004]; int ss[200004]; int ft[200004]; int ift[200004]; #define BB 500 int xx[401][200004]; // (500+200000)*400/2 int ns[200004]; int ms[200004]; int main() { int n, i, m, k, nn; int inv2 = expit(2, MOD-2); int xn; int tc; scanf("%d", &tc); for (i=0; in) { nn--; // move nn-> nn-1 t=ft[nn]; t*=ift[m]; t%=MOD; t*=ift[nn-m]; t%=MOD; t+=r; t%=MOD; t*=inv2; t%=MOD; r=t; } // c(n-1, m-1)+...C(n-1, 0) // r=ft[n-1]; r*=ift[m-1]; r%=MOD; r*=ift[n-m]; r%=MOD; r*=ss[n+1]; r%=MOD; printf("%lld\n", r); } return 0; }