#include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 1000000000000000000LL int main(){ string s,t; cin>>s>>t; int n = s.size(),m = t.size(); vector dp(m+1,0); dp[0] = 1; rep(i,n){ vector ndp(m+1,0); rep(j,m+1){ ndp[j] += dp[j] * 2; if(j!=m && s[i]==t[j]) ndp[j+1] += dp[j]; } swap(dp,ndp); } cout<