#include #include using namespace std; using namespace atcoder; using ll = long long; using mint = modint998244353; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); int H, W, y1, y2, nx1, ny1, nx2, ny2; cin >> H >> W; vector S(H); int dx[2] = {0, 1}, dy[2] = {1, 0}; for (int i=0; i> S[i]; vector dp(H, vector(H)); dp[0][0] = 1; auto check=[&](int x, int y){ return 0 <= x && x < H && 0 <= y && y < W; }; for (int i=0; i<=H+W-4; i++){ vector pd(H, vector(H)); for (int x1=0; x1