#include using namespace std; void rd(int &x){ int k, m=0; x=0; for(;;){ k = getchar_unlocked(); if(k=='-'){ m=1; break; } if('0'<=k&&k<='9'){ x=k-'0'; break; } } for(;;){ k = getchar_unlocked(); if(k<'0'||k>'9'){ break; } x=x*10+k-'0'; } if(m){ x=-x; } } void rd(char c[]){ int i, sz=0; for(;;){ i = getchar_unlocked(); if(i!=' '&&i!='\n'&&i!='\r'&&i!='\t'&&i!=EOF){ break; } } c[sz++] = i; for(;;){ i = getchar_unlocked(); if(i==' '||i=='\n'||i=='\r'||i=='\t'||i==EOF){ break; } c[sz++] = i; } c[sz]='\0'; } void wt_L(long long x){ char f[20]; int m=0, s=0; if(x<0){ m=1; x=-x; } while(x){ f[s++]=x%10; x/=10; } if(!s){ f[s++]=0; } if(m){ putchar_unlocked('-'); } while(s--){ putchar_unlocked(f[s]+'0'); } } void wt_L(const char c[]){ int i=0; for(i=0;c[i]!='\0';i++){ putchar_unlocked(c[i]); } } char name[15][15]; int K, P, PX[15], PY[15], X, Y; long long dp[33][33]; int main(){ int bc, i, j, k, mask, resmask; long long res, tmp; rd(X); rd(Y); rd(K); rd(P); { int Lj4PdHRW; for(Lj4PdHRW=0;Lj4PdHRW0){ dp[i][j] += dp[i-1][j]; } if(j && dp[i][j-1]>0){ dp[i][j] += dp[i][j-1]; } } } if(res < dp[X][Y]){ res = dp[X][Y]; resmask = mask; } } wt_L(res%(1000000000+7)); putchar_unlocked('\n'); for(i=0;i0) dp[i][j] += dp[i-1][j]; // if(j && dp[i][j-1]>0) dp[i][j] += dp[i][j-1]; // } // // if(res < dp[X][Y]){ // res = dp[X][Y]; // resmask = mask; // } // } // // wt(res%(1d9+7)); // rep(i,K) if(resmask & 1<