#include #include #include #include #include #include #include #include #include #include #define mkp make_pair #define mkt make_tuple #define rep(i,n) for(int i = 0; i < (n); ++i) using namespace std; typedef long long ll; const ll MOD=1e9+7; #define MAX_N 2000010 ll inv[MAX_N+10],fac[MAX_N+10],ifac[MAX_N+10]; void setComb(){ inv[0]=1;inv[1]=1;fac[1]=1;ifac[1]=1;fac[0]=1;ifac[0]=1; for(int i=2;i>D>>L>>R>>K; setComb(); int N=(1< A(D+1,1); for(int i=0;i=K){ int r=-1; int o=y-x; for(int i=x;i>=1;i--){ if(o==K) r=i; o+=2; } if(r==-1||y-r+x-r!=K){ cout<<0<