#include #include #include #include #include using namespace std; using i64 = long long; using u64 = unsigned long long; #define rep(i,n) for(int i=0; i<(int)(n); i++) const i64 INF = 1001001001001001001; const char* yn(bool x){ return x ? "Yes" : "No"; } using Modint = atcoder::static_modint<998244353>; void testcase(){ int N; cin >> N; vector A(N); rep(i,N) cin >> A[i]; Modint f = 1, ff = 1; for(int i=1; i