#include #include using namespace std; void solve(){ auto f=[&](int i1,int j1,int i2,int j2){ int di=abs(i1-i2),dj=abs(j1-j2); if (di==0&&dj==0) return true; if (di==0||dj==0||di==dj) return true; return false; }; using ll=long long; using mint=atcoder::modint998244353; ll h,w,sx,sy,gx,gy,k; cin>>h>>w>>sx>>sy>>gx>>gy>>k; sx--;sy--;gx--;gy--; int n=h*w; vector dp(n,vector(n,vector(1<>j&1)&&j!=k) dp[i][j][bit^(1<>; V dp2(n,vector(n)),pw=dp2; for (int i=0;i(n)); for (int i=0;i>t; while (t--) solve(); }