stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<bits/stdc++.h>

#define ll long long int

#define pii <pair<ll,ll>>

using namespace std;



int digit(ll p)

{

    ll c=0;

    while(p>0)

    {

        c++;

        p=p/10;

    }

    return c;

}



void solve()

{

    ll n;

     cin >> n;

     ll ans=0;

     for(int i=1;i<=n;i++)

     {

         if(digit(i)%2!=0)

            ans++;

     }

     cout << ans << endl;

}



int main()

{

     solve();

     return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.251168143588184x):
#include<stdio.h>



int main()

{

    int N, i, s=1, count=0;



    scanf("%d", &N);



    for(i=1; i<=N; i++){

        if(1*s <= i && i < 10*s){

            count++;

            if(i == (10*s-1))

                s *=100;

        }

    }



    printf("%d\n", count);



    return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

  int n, tmp, c=0, ans;

  cin >> n;

  tmp = n;

  while(tmp)

  {

      tmp /= 10;

      c++;

  }

  if(c == 1)

    ans = n;

  else if(c == 2)

    ans = 9;

  else if(c == 3)

    ans = n-99+9;

  else if(c == 4)

    ans = 909;

  else if(c == 5)

    ans = n-9999+909;

  else if(c == 6)

    ans = 90909;

  

  cout << ans <<"\n";

  return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.202351844928632x):
#include<stdio.h>



int main()

{

    int N, i, s=1, count=0;



    scanf("%d", &N);



    for(i=1; i<=N; i++){

        if(1*s <= i && i < 10*s){

            count++;

            if(i == (10*s-1))

                s *=100;

        }

    }



    printf("%d\n", count);



    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

void debug() {cout<<endl;}

template<typename T,typename... Args>

void debug(T x,Args... args) {cout<<x<<" ";debug(args...);}

#define forn(i,a,b) for(int i=a;i<b;++i)

#define SZ(x) int(x.size())

#define pb push_back

#define F first

#define S second

#define endl "\n"

typedef long long ll;

typedef pair<int, int> pii;



int main() {

    ios::sync_with_stdio(0); cin.tie(0);

    int n;

    cin >> n;

    int ans = 0;

    forn(i, 1, n+1) {

        string s = to_string(i);

        ans += SZ(s)&1;

    }

    cout << ans << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.474568213772304x):
#include<stdio.h>



int main()

{

    int N, i, s=1, count=0;



    scanf("%d", &N);



    for(i=1; i<=N; i++){

        if(1*s <= i && i < 10*s){

            count++;

            if(i == (10*s-1))

                s *=100;

        }

    }



    printf("%d\n", count);



    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main(){

	int n; cin>>n;

	int ans=0;

	for(int i=1; i<=n; i++){

		int aux = (log10(i)+1);

		if(aux%2!=0)

			ans++;

	}

	cout<<ans<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.365848360465646x):
#include<stdio.h>



int main()

{

    int N, i, s=1, count=0;



    scanf("%d", &N);



    for(i=1; i<=N; i++){

        if(1*s <= i && i < 10*s){

            count++;

            if(i == (10*s-1))

                s *=100;

        }

    }



    printf("%d\n", count);



    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



#define ll long long



const ll mod=1e9+7;

const int N = 2e5 + 20;



ll f[N];



ll pw(ll x, ll y){

	ll p = 1;

	while (y){

		if (y & 1){

			p = p * x % mod;

		}

		x = x * x % mod;

		y >>= 1;

	}

	return p;

}



ll C(ll n,ll k)

{

    ll a=f[n];

    ll b=(f[k]*f[n-k])%mod;

    return (a*pw(b,mod-2))%mod;

}



int main()

{

    f[0]=1;

    for(int i=1;i<N;i++)

    {

        f[i]=(i*f[i-1])%mod;

    }

    ll h,w,a,b;

    cin>>h>>w>>a>>b;



    ll ans=0;

    for(ll i=b+1;i<=w;i++)

    {

//        cout<<"B";

        ll tmp=(C(i-1+h-a-1,h-a-1)*C(w-i+a-1,w-i))%mod;

//        cout<<C(i-1+h-a-1,h-a-1)<<" "<<C(w-i+a-1,w-i)<<" ";

//        cout<<tmp<<endl;

//cout<<"A";

        ans=(ans+tmp) %mod;

    }

    cout<<ans%mod;

}


// Faster C++ solution for the same problem (measured speedup: 1.1097239036657243x):
#include<cstdio>

#include<cstring>

#include<algorithm>

#define MO 1000000007

#define MAXN 200000

using namespace std;

int inv[MAXN+5],fact[MAXN+5];

int PowMod(int a,int b)

{

	int ret=1;

	a%=MO;

	while(b!=0)

	{

		if(b&1)

			ret=1LL*ret*a%MO;

		a=1LL*a*a%MO;

		b>>=1;

	}

	return ret;

}

void prepare()

{

	fact[0]=1;

	for(int i=1;i<=MAXN;i++)

		fact[i]=1LL*fact[i-1]*i%MO;

	inv[MAXN]=PowMod(fact[MAXN],MO-2);

	for(int i=MAXN-1;i>=0;i--)

		inv[i]=1LL*inv[i+1]*(i+1LL)%MO;

}

int C(int n,int m)

{

	return 1LL*fact[n]*inv[m]%MO*inv[n-m]%MO;

}

int main()

{

	prepare();

	int r,c,A,B;

	scanf("%d %d %d %d",&r,&c,&A,&B);

	int ans=0;

	int val;

	for(int i=0;i<=r-1-A;i++)

	{

		val=1LL*C(i+B-1,i)*C(r-i-1+c-B-1,r-i-1)%MO;

		ans=(1LL*ans+val)%MO;

	}

	printf("%d\n",ans);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



#define ll long long



const ll mod=1e9+7;

const int N = 2e5 + 20;



ll f[N];



ll pw(ll x, ll y){

	ll p = 1;

	while (y){

		if (y & 1){

			p = p * x % mod;

		}

		x = x * x % mod;

		y >>= 1;

	}

	return p;

}



ll C(ll n,ll k)

{

    ll a=f[n];

    ll b=(f[k]*f[n-k])%mod;

    return (a*pw(b,mod-2))%mod;

}



int main()

{

    f[0]=1;

    for(int i=1;i<N;i++)

    {

        f[i]=(i*f[i-1])%mod;

    }

    ll h,w,a,b;

    cin>>h>>w>>a>>b;



    ll ans=0;

    for(ll i=b+1;i<=w;i++)

    {

//        cout<<"B";

        ll tmp=(C(i-1+h-a-1,h-a-1)*C(w-i+a-1,w-i))%mod;

//        cout<<C(i-1+h-a-1,h-a-1)<<" "<<C(w-i+a-1,w-i)<<" ";

//        cout<<tmp<<endl;

//cout<<"A";

        ans=(ans+tmp) %mod;

    }

    cout<<ans%mod;

}


// Faster C++ solution for the same problem (measured speedup: 2.634091608103317x):
#include<iostream>

#include<cstdio>

#include<cstring>

#include<climits>

#include<algorithm>

#include<cmath>

#include<queue>

using namespace std;

#define MAXN 100000

#define M 1000000007

#define LL long long

LL n,m,p,q,ans,S;

LL fac[MAXN*2+5],inv[MAXN*2+5];

LL fst_pow(LL A,int B)

{

	LL ret=1;

	while(B)

	{

		if(B&1)ret=ret*A%M;

		A=A*A%M;

		B>>=1;

	}

	return  ret;

}

void init()

{

	fac[0]=1;

	for(int i=1;i<=S;i++)

	{

		fac[i]=(fac[i-1]*(i%M))%M;

	}

	inv[S]=fst_pow(fac[S],M-2);

	inv[0]=1;

	for(int i=S-1;i>=1;i--)

	{

		inv[i]=(inv[i+1]*((i+1)%M))%M;

	}

}

LL Comb(int N,int R)

{

	if(N<0||R<0)return 1;

	return fac[N]*inv[R]%M*inv[N-R]%M;

}

int main()

{

	scanf("%lld%lld%lld%lld",&n,&m,&p,&q);

	S=n+m-2;

	init();

	ans=Comb(n+m-2,n-1);

	for(int i=1;i<=q;i++)

	{

		ans-=Comb(n-p+i-2,n-p-1)*Comb(p-1+m-i,p-1)%M;

		//printf("%lld %lld\n",Comb(n-p+i-2,n-p-1),Comb(p-1+m-i,p-1));

		ans=(ans%M+M)%M;

	}

	printf("%lld",ans);

}

//2 3 1 1

//10 7 3 4
// Slower C++ solution:
#include<cstdio>

#include<cstring>

#include<algorithm>

#define MO 1000000007

#define MAXN 200000

using namespace std;

int inv[MAXN+5],fact[MAXN+5];

int PowMod(int a,int b)

{

	int ret=1;

	a%=MO;

	while(b!=0)

	{

		if(b&1)

			ret=1LL*ret*a%MO;

		a=1LL*a*a%MO;

		b>>=1;

	}

	return ret;

}

void prepare()

{

	fact[0]=1;

	for(int i=1;i<=MAXN;i++)

		fact[i]=1LL*fact[i-1]*i%MO;

	inv[MAXN]=PowMod(fact[MAXN],MO-2);

	for(int i=MAXN-1;i>=0;i--)

		inv[i]=1LL*inv[i+1]*(i+1LL)%MO;

}

int C(int n,int m)

{

	return 1LL*fact[n]*inv[m]%MO*inv[n-m]%MO;

}

int main()

{

	prepare();

	int r,c,A,B;

	scanf("%d %d %d %d",&r,&c,&A,&B);

	int ans=0;

	int val;

	for(int i=0;i<=r-1-A;i++)

	{

		val=1LL*C(i+B-1,i)*C(r-i-1+c-B-1,r-i-1)%MO;

		ans=(1LL*ans+val)%MO;

	}

	printf("%d\n",ans);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 2.373645912647448x):
#include<iostream>

#include<cstdio>

#include<cstring>

#include<climits>

#include<algorithm>

#include<cmath>

#include<queue>

using namespace std;

#define MAXN 100000

#define M 1000000007

#define LL long long

LL n,m,p,q,ans,S;

LL fac[MAXN*2+5],inv[MAXN*2+5];

LL fst_pow(LL A,int B)

{

	LL ret=1;

	while(B)

	{

		if(B&1)ret=ret*A%M;

		A=A*A%M;

		B>>=1;

	}

	return  ret;

}

void init()

{

	fac[0]=1;

	for(int i=1;i<=S;i++)

	{

		fac[i]=(fac[i-1]*(i%M))%M;

	}

	inv[S]=fst_pow(fac[S],M-2);

	inv[0]=1;

	for(int i=S-1;i>=1;i--)

	{

		inv[i]=(inv[i+1]*((i+1)%M))%M;

	}

}

LL Comb(int N,int R)

{

	if(N<0||R<0)return 1;

	return fac[N]*inv[R]%M*inv[N-R]%M;

}

int main()

{

	scanf("%lld%lld%lld%lld",&n,&m,&p,&q);

	S=n+m-2;

	init();

	ans=Comb(n+m-2,n-1);

	for(int i=1;i<=q;i++)

	{

		ans-=Comb(n-p+i-2,n-p-1)*Comb(p-1+m-i,p-1)%M;

		//printf("%lld %lld\n",Comb(n-p+i-2,n-p-1),Comb(p-1+m-i,p-1));

		ans=(ans%M+M)%M;

	}

	printf("%lld",ans);

}

//2 3 1 1

//10 7 3 4
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



#define ll long long



const ll mod=1e9+7;

const int N = 2e5 + 20;



ll f[N];



ll pw(ll x, ll y){

	ll p = 1;

	while (y){

		if (y & 1){

			p = p * x % mod;

		}

		x = x * x % mod;

		y >>= 1;

	}

	return p;

}



ll C(ll n,ll k)

{

    ll a=f[n];

    ll b=(f[k]*f[n-k])%mod;

    return (a*pw(b,mod-2))%mod;

}



int main()

{

    f[0]=1;

    for(int i=1;i<N;i++)

    {

        f[i]=(i*f[i-1])%mod;

    }

    ll h,w,a,b;

    cin>>h>>w>>a>>b;



    ll ans=0;

    for(ll i=b+1;i<=w;i++)

    {

//        cout<<"B";

        ll tmp=(C(i-1+h-a-1,h-a-1)*C(w-i+a-1,w-i))%mod;

//        cout<<C(i-1+h-a-1,h-a-1)<<" "<<C(w-i+a-1,w-i)<<" ";

//        cout<<tmp<<endl;

//cout<<"A";

        ans=(ans+tmp) %mod;

    }

    cout<<ans%mod;

}


// Faster C++ solution for the same problem (measured speedup: 13.585106243259926x):
#include<cstdio>

#include<cstring>

using namespace std;

#define MOD 1000000007

#define MAXN 200000

typedef long long ll;

ll inv[MAXN+5],s[MAXN+5];

int n;

ll PowMod(ll a,int b)//快速幂

{

	ll ans=1;

	while(b)

	{

		if(b&1) ans=ans*a%MOD;

		a=a*a%MOD;

		b>>=1;

	} 

	return ans;

 } 

void Pre()

{

	s[0]=1;

	for(int i=1;i<=n;i++)

	s[i]=s[i-1]*i%MOD;

	inv[0]=1;

	inv[n]=PowMod(s[n],MOD-2);

	for(int i=n-1;i>0;i--)

	inv[i]=inv[i+1]*(i+1)%MOD;

 } 

 ll C(int a,int b)

 {

 	if(a<0||b<0) return 1;

 	return s[a]*inv[b]%MOD*inv[a-b]%MOD;

 }

 

int main()

{

	int h,w,a,b;

	scanf("%d %d %d %d",&h,&w,&a,&b);

	n=h+w-2;

	Pre();

	ll ans=C(h+w-2,h-1);

	for(int i=1;i<=b;i++)

	{

		ans-=C(h-a+i-2,h-a-1)*C(a-1+w-i,a-1)%MOD;

		ans=(ans%MOD+MOD)%MOD;

	}

	printf("%lld\n",ans);

 }
// Slower C++ solution:
#include<cstdio>

#include<cstring>

#include<algorithm>

#define MO 1000000007

#define MAXN 200000

using namespace std;

int inv[MAXN+5],fact[MAXN+5];

int PowMod(int a,int b)

{

	int ret=1;

	a%=MO;

	while(b!=0)

	{

		if(b&1)

			ret=1LL*ret*a%MO;

		a=1LL*a*a%MO;

		b>>=1;

	}

	return ret;

}

void prepare()

{

	fact[0]=1;

	for(int i=1;i<=MAXN;i++)

		fact[i]=1LL*fact[i-1]*i%MO;

	inv[MAXN]=PowMod(fact[MAXN],MO-2);

	for(int i=MAXN-1;i>=0;i--)

		inv[i]=1LL*inv[i+1]*(i+1LL)%MO;

}

int C(int n,int m)

{

	return 1LL*fact[n]*inv[m]%MO*inv[n-m]%MO;

}

int main()

{

	prepare();

	int r,c,A,B;

	scanf("%d %d %d %d",&r,&c,&A,&B);

	int ans=0;

	int val;

	for(int i=0;i<=r-1-A;i++)

	{

		val=1LL*C(i+B-1,i)*C(r-i-1+c-B-1,r-i-1)%MO;

		ans=(1LL*ans+val)%MO;

	}

	printf("%d\n",ans);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 12.24187944261142x):
#include<cstdio>

#include<cstring>

using namespace std;

#define MOD 1000000007

#define MAXN 200000

typedef long long ll;

ll inv[MAXN+5],s[MAXN+5];

int n;

ll PowMod(ll a,int b)//快速幂

{

	ll ans=1;

	while(b)

	{

		if(b&1) ans=ans*a%MOD;

		a=a*a%MOD;

		b>>=1;

	} 

	return ans;

 } 

void Pre()

{

	s[0]=1;

	for(int i=1;i<=n;i++)

	s[i]=s[i-1]*i%MOD;

	inv[0]=1;

	inv[n]=PowMod(s[n],MOD-2);

	for(int i=n-1;i>0;i--)

	inv[i]=inv[i+1]*(i+1)%MOD;

 } 

 ll C(int a,int b)

 {

 	if(a<0||b<0) return 1;

 	return s[a]*inv[b]%MOD*inv[a-b]%MOD;

 }

 

int main()

{

	int h,w,a,b;

	scanf("%d %d %d %d",&h,&w,&a,&b);

	n=h+w-2;

	Pre();

	ll ans=C(h+w-2,h-1);

	for(int i=1;i<=b;i++)

	{

		ans-=C(h-a+i-2,h-a-1)*C(a-1+w-i,a-1)%MOD;

		ans=(ans%MOD+MOD)%MOD;

	}

	printf("%lld\n",ans);

 }
// Slower C++ solution:
#include<iostream>

#include<cstdio>

#include<cstring>

#include<climits>

#include<algorithm>

#include<cmath>

#include<queue>

using namespace std;

#define MAXN 100000

#define M 1000000007

#define LL long long

LL n,m,p,q,ans,S;

LL fac[MAXN*2+5],inv[MAXN*2+5];

LL fst_pow(LL A,int B)

{

	LL ret=1;

	while(B)

	{

		if(B&1)ret=ret*A%M;

		A=A*A%M;

		B>>=1;

	}

	return  ret;

}

void init()

{

	fac[0]=1;

	for(int i=1;i<=S;i++)

	{

		fac[i]=(fac[i-1]*(i%M))%M;

	}

	inv[S]=fst_pow(fac[S],M-2);

	inv[0]=1;

	for(int i=S-1;i>=1;i--)

	{

		inv[i]=(inv[i+1]*((i+1)%M))%M;

	}

}

LL Comb(int N,int R)

{

	if(N<0||R<0)return 1;

	return fac[N]*inv[R]%M*inv[N-R]%M;

}

int main()

{

	scanf("%lld%lld%lld%lld",&n,&m,&p,&q);

	S=n+m-2;

	init();

	ans=Comb(n+m-2,n-1);

	for(int i=1;i<=q;i++)

	{

		ans-=Comb(n-p+i-2,n-p-1)*Comb(p-1+m-i,p-1)%M;

		//printf("%lld %lld\n",Comb(n-p+i-2,n-p-1),Comb(p-1+m-i,p-1));

		ans=(ans%M+M)%M;

	}

	printf("%lld",ans);

}

//2 3 1 1

//10 7 3 4


// Faster C++ solution for the same problem (measured speedup: 5.157416014487784x):
#include<cstdio>

#include<cstring>

using namespace std;

#define MOD 1000000007

#define MAXN 200000

typedef long long ll;

ll inv[MAXN+5],s[MAXN+5];

int n;

ll PowMod(ll a,int b)//快速幂

{

	ll ans=1;

	while(b)

	{

		if(b&1) ans=ans*a%MOD;

		a=a*a%MOD;

		b>>=1;

	} 

	return ans;

 } 

void Pre()

{

	s[0]=1;

	for(int i=1;i<=n;i++)

	s[i]=s[i-1]*i%MOD;

	inv[0]=1;

	inv[n]=PowMod(s[n],MOD-2);

	for(int i=n-1;i>0;i--)

	inv[i]=inv[i+1]*(i+1)%MOD;

 } 

 ll C(int a,int b)

 {

 	if(a<0||b<0) return 1;

 	return s[a]*inv[b]%MOD*inv[a-b]%MOD;

 }

 

int main()

{

	int h,w,a,b;

	scanf("%d %d %d %d",&h,&w,&a,&b);

	n=h+w-2;

	Pre();

	ll ans=C(h+w-2,h-1);

	for(int i=1;i<=b;i++)

	{

		ans-=C(h-a+i-2,h-a-1)*C(a-1+w-i,a-1)%MOD;

		ans=(ans%MOD+MOD)%MOD;

	}

	printf("%lld\n",ans);

 }
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



#define ll long long



const ll mod=1e9+7;

const int N = 2e5 + 20;



ll f[N];



ll pw(ll x, ll y){

	ll p = 1;

	while (y){

		if (y & 1){

			p = p * x % mod;

		}

		x = x * x % mod;

		y >>= 1;

	}

	return p;

}



ll C(ll n,ll k)

{

    ll a=f[n];

    ll b=(f[k]*f[n-k])%mod;

    return (a*pw(b,mod-2))%mod;

}



int main()

{

    f[0]=1;

    for(int i=1;i<N;i++)

    {

        f[i]=(i*f[i-1])%mod;

    }

    ll h,w,a,b;

    cin>>h>>w>>a>>b;



    ll ans=0;

    for(ll i=b+1;i<=w;i++)

    {

//        cout<<"B";

        ll tmp=(C(i-1+h-a-1,h-a-1)*C(w-i+a-1,w-i))%mod;

//        cout<<C(i-1+h-a-1,h-a-1)<<" "<<C(w-i+a-1,w-i)<<" ";

//        cout<<tmp<<endl;

//cout<<"A";

        ans=(ans+tmp) %mod;

    }

    cout<<ans%mod;

}


// Faster C++ solution for the same problem (measured speedup: 13.6221001864192x):
#include<cstdio>



#define LL long long

#define MAXN 100000

#define MOD 1000000007

LL fac[2*MAXN+5];

LL inv[2*MAXN+5];



LL Pow(LL x,LL p){

    LL ret=1;

    while(p){

        if(p&1)

            ret=ret*x%MOD;

        x=(x*x)%MOD;

        p>>=1;

    }

    return ret;

}



void Prep(int N){

    fac[0]=1;

    for(int i=1;i<=N;i++)

        fac[i]=fac[i-1]*i%MOD;

    //inv[fac[i]]=Pow(fac[i],MOD-2)=Pow(1,MOD-2)...Pow(i,MOD-2)

    //inv[fac[i-1]]=Pow(fac[i-1],MOD-2)=Pow(1,MOD-2)...Pow(i-1,MOD-2)=Pow(fac[i],MOD-2)/Pow(i,MOD-2)=inv[i]*i

    inv[0]=1;

    inv[N]=Pow(fac[N],MOD-2);

    for(int i=N-1;i>=1;i--)

        inv[i]=inv[i+1]*(i+1)%MOD;

}



LL C(int m,int n){

    return fac[m]*inv[n]%MOD*inv[m-n]%MOD;

}



int main(){

    int H,W,A,B;

    scanf("%d%d%d%d",&H,&W,&A,&B);

    Prep(H+W);

    LL Ans=0;

    for(int i=B+1;i<=W;i++){

        LL tmp1=C(H-A+i-2,i-1);

        //C(m+n-x-y-2,m-x-1)

        //(H-A,i) -> (H,W)

        LL tmp2=C(A+W-i-1,A-1);

        Ans=(Ans+(tmp1*tmp2)%MOD)%MOD;

    }

    printf("%lld",Ans);

}
// Slower C++ solution:
#include<cstdio>

#include<cstring>

#include<algorithm>

#define MO 1000000007

#define MAXN 200000

using namespace std;

int inv[MAXN+5],fact[MAXN+5];

int PowMod(int a,int b)

{

	int ret=1;

	a%=MO;

	while(b!=0)

	{

		if(b&1)

			ret=1LL*ret*a%MO;

		a=1LL*a*a%MO;

		b>>=1;

	}

	return ret;

}

void prepare()

{

	fact[0]=1;

	for(int i=1;i<=MAXN;i++)

		fact[i]=1LL*fact[i-1]*i%MO;

	inv[MAXN]=PowMod(fact[MAXN],MO-2);

	for(int i=MAXN-1;i>=0;i--)

		inv[i]=1LL*inv[i+1]*(i+1LL)%MO;

}

int C(int n,int m)

{

	return 1LL*fact[n]*inv[m]%MO*inv[n-m]%MO;

}

int main()

{

	prepare();

	int r,c,A,B;

	scanf("%d %d %d %d",&r,&c,&A,&B);

	int ans=0;

	int val;

	for(int i=0;i<=r-1-A;i++)

	{

		val=1LL*C(i+B-1,i)*C(r-i-1+c-B-1,r-i-1)%MO;

		ans=(1LL*ans+val)%MO;

	}

	printf("%d\n",ans);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 12.275215611217929x):
#include<cstdio>



#define LL long long

#define MAXN 100000

#define MOD 1000000007

LL fac[2*MAXN+5];

LL inv[2*MAXN+5];



LL Pow(LL x,LL p){

    LL ret=1;

    while(p){

        if(p&1)

            ret=ret*x%MOD;

        x=(x*x)%MOD;

        p>>=1;

    }

    return ret;

}



void Prep(int N){

    fac[0]=1;

    for(int i=1;i<=N;i++)

        fac[i]=fac[i-1]*i%MOD;

    //inv[fac[i]]=Pow(fac[i],MOD-2)=Pow(1,MOD-2)...Pow(i,MOD-2)

    //inv[fac[i-1]]=Pow(fac[i-1],MOD-2)=Pow(1,MOD-2)...Pow(i-1,MOD-2)=Pow(fac[i],MOD-2)/Pow(i,MOD-2)=inv[i]*i

    inv[0]=1;

    inv[N]=Pow(fac[N],MOD-2);

    for(int i=N-1;i>=1;i--)

        inv[i]=inv[i+1]*(i+1)%MOD;

}



LL C(int m,int n){

    return fac[m]*inv[n]%MOD*inv[m-n]%MOD;

}



int main(){

    int H,W,A,B;

    scanf("%d%d%d%d",&H,&W,&A,&B);

    Prep(H+W);

    LL Ans=0;

    for(int i=B+1;i<=W;i++){

        LL tmp1=C(H-A+i-2,i-1);

        //C(m+n-x-y-2,m-x-1)

        //(H-A,i) -> (H,W)

        LL tmp2=C(A+W-i-1,A-1);

        Ans=(Ans+(tmp1*tmp2)%MOD)%MOD;

    }

    printf("%lld",Ans);

}
// Slower C++ solution:
#include<iostream>

#include<cstdio>

#include<cstring>

#include<climits>

#include<algorithm>

#include<cmath>

#include<queue>

using namespace std;

#define MAXN 100000

#define M 1000000007

#define LL long long

LL n,m,p,q,ans,S;

LL fac[MAXN*2+5],inv[MAXN*2+5];

LL fst_pow(LL A,int B)

{

	LL ret=1;

	while(B)

	{

		if(B&1)ret=ret*A%M;

		A=A*A%M;

		B>>=1;

	}

	return  ret;

}

void init()

{

	fac[0]=1;

	for(int i=1;i<=S;i++)

	{

		fac[i]=(fac[i-1]*(i%M))%M;

	}

	inv[S]=fst_pow(fac[S],M-2);

	inv[0]=1;

	for(int i=S-1;i>=1;i--)

	{

		inv[i]=(inv[i+1]*((i+1)%M))%M;

	}

}

LL Comb(int N,int R)

{

	if(N<0||R<0)return 1;

	return fac[N]*inv[R]%M*inv[N-R]%M;

}

int main()

{

	scanf("%lld%lld%lld%lld",&n,&m,&p,&q);

	S=n+m-2;

	init();

	ans=Comb(n+m-2,n-1);

	for(int i=1;i<=q;i++)

	{

		ans-=Comb(n-p+i-2,n-p-1)*Comb(p-1+m-i,p-1)%M;

		//printf("%lld %lld\n",Comb(n-p+i-2,n-p-1),Comb(p-1+m-i,p-1));

		ans=(ans%M+M)%M;

	}

	printf("%lld",ans);

}

//2 3 1 1

//10 7 3 4


// Faster C++ solution for the same problem (measured speedup: 5.1714603032458015x):
#include<cstdio>



#define LL long long

#define MAXN 100000

#define MOD 1000000007

LL fac[2*MAXN+5];

LL inv[2*MAXN+5];



LL Pow(LL x,LL p){

    LL ret=1;

    while(p){

        if(p&1)

            ret=ret*x%MOD;

        x=(x*x)%MOD;

        p>>=1;

    }

    return ret;

}



void Prep(int N){

    fac[0]=1;

    for(int i=1;i<=N;i++)

        fac[i]=fac[i-1]*i%MOD;

    //inv[fac[i]]=Pow(fac[i],MOD-2)=Pow(1,MOD-2)...Pow(i,MOD-2)

    //inv[fac[i-1]]=Pow(fac[i-1],MOD-2)=Pow(1,MOD-2)...Pow(i-1,MOD-2)=Pow(fac[i],MOD-2)/Pow(i,MOD-2)=inv[i]*i

    inv[0]=1;

    inv[N]=Pow(fac[N],MOD-2);

    for(int i=N-1;i>=1;i--)

        inv[i]=inv[i+1]*(i+1)%MOD;

}



LL C(int m,int n){

    return fac[m]*inv[n]%MOD*inv[m-n]%MOD;

}



int main(){

    int H,W,A,B;

    scanf("%d%d%d%d",&H,&W,&A,&B);

    Prep(H+W);

    LL Ans=0;

    for(int i=B+1;i<=W;i++){

        LL tmp1=C(H-A+i-2,i-1);

        //C(m+n-x-y-2,m-x-1)

        //(H-A,i) -> (H,W)

        LL tmp2=C(A+W-i-1,A-1);

        Ans=(Ans+(tmp1*tmp2)%MOD)%MOD;

    }

    printf("%lld",Ans);

}
// Slower C++ solution:
#include <cstdio>

typedef long long LL;

const int maxn=1e5+10;

const int mod=1e9+7;

LL H,W,a,b;

LL s[2*maxn+10],inv[2*maxn+10];



inline LL qpow(LL a,LL b) {

    LL res=1;

    while (b) {

        if (b&1) res=res*a%mod;

        a=a*a%mod;

        b>>=1;

    }

    return res%mod;

}



void _init() {

    s[0]=s[1]=1;

    for (int i=2;i<=2*maxn;i++)

        s[i]=s[i-1]*i%mod;



    inv[0]=1; inv[2*maxn]=qpow(s[2*maxn],mod-2);

    for (int i=2*maxn-1;i>=1;i--) inv[i]=inv[i+1]*(i+1)%mod;

}



LL C(LL m,LL n) {

    return s[m]*inv[n]%mod*inv[m-n]%mod;

}



int main() {

    _init();

    scanf("%lld%lld%lld%lld",&H,&W,&a,&b);

    LL ans=0;

    for (int i=b+1;i<=W;i++)

        ans=(ans+C(H-a+i-2,H-a-1)*C(W+a-i-1,a-1)%mod)%mod;

    printf("%lld\n", ans);

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.3127772951581573x):
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

const ll mod=1000000007;

ll fac[200005];

void init()

{

    fac[0]=fac[1]=1;

    for(int i=2;i<=200000;i++)

    {

        fac[i]=fac[i-1]*i%mod;

    }

    return ;

}

ll pow(ll a,ll n)

{

    ll ans=1;

    while(n)

    {

        if(n&1)

        {

            ans=ans*a%mod;

        }

        a=a*a%mod;

        n=n>>1;

    }

    return ans;

}

ll work(ll m,ll n)

{

    ll ans=fac[m+n-2];

    ans=ans*pow(fac[n-1],mod-2)%mod;

    ans=ans*pow(fac[m-1],mod-2)%mod;

    return ans;

}

int main()

{

    ll h,w,a,b;

    cin>>h>>w>>a>>b;

    init();

    ll pre=0,ans=0,k=w-b;

    for(int i=b+1;i<=w;i++,k++)

    {

        ll cnt=work(h-a,i);

        ll tmp=cnt*work(a,w-i+1)%mod;

        ans=(ans+tmp)%mod;

    }

    printf("%lld\n",ans);

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>

#include <cstdlib>

#include <cmath>

#include <algorithm>

#include <climits>

#include <cstring>

#include <string>

#include <set>

#include <bitset>

#include <map>

#include <queue>

#include <stack>

#include <vector>

#define rep(i,m,n) for(i=m;i<=n;i++)

#define mod 1000000007

#define inf 0x3f3f3f3f

#define vi vector<int>

#define pb push_back

#define mp make_pair

#define fi first

#define se second

#define ll long long

#define pi acos(-1.0)

#define pii pair<int,int>

#define sys system("pause")

const int maxn=2e5+10;

const int N=1e3+10;

using namespace std;

ll gcd(ll p,ll q){return q==0?p:gcd(q,p%q);}

ll qpow(ll p,ll q){ll f=1;while(q){if(q&1)f=f*p%mod;p=p*p%mod;q>>=1;}return f;}

int n,m,k,t,h,w,a,b;

ll fac[maxn],inv[maxn];

void init()

{

    fac[0]=1;

    for(int i=1;i<=maxn-10;i++)fac[i]=fac[i-1]*i%mod;

    inv[maxn-10]=qpow(fac[maxn-10],mod-2);

    for(int i=maxn-11;i>=0;i--)inv[i]=inv[i+1]*(i+1)%mod;

}

ll C(int x,int y)

{

    return fac[x]*inv[y]%mod*inv[x-y]%mod;

}

int main()

{

    int i,j;

    init();

    scanf("%d%d%d%d",&h,&w,&a,&b);

    ll ret=C(h+w-2,h-1);

    for(i=0;i<=b-1;i++)ret=(ret-C(i+h-a-1,h-a-1)*C(w-i+a-2,a-1)%mod+mod)%mod;

    printf("%lld\n",ret);

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.2339861494258102x):
#include<cstdio>

#include<algorithm>

#define MOD 1000000007

#define MAXN 200006

using namespace std;

long long fac[MAXN],inv[MAXN],ans;

int n,m,a,b;

long long ksm(long long a,long long m)

{

	if(m==0) return 1;

	long long nex=ksm(a,m/2);

	nex=(nex*nex)%MOD;

	if(m%2==0) return nex;

	else return (nex*a)%MOD;

}

void waiting()

{

	fac[0]=1;

	for(long long i=1;i<MAXN;i++)

		fac[i]=(fac[i-1]*i)%MOD;

	inv[MAXN-1]=ksm(fac[MAXN-1],MOD-2);

	for(long long i=MAXN-2;i>=0;i--)

		inv[i]=(inv[i+1]*(i+1))%MOD;

}

long long C(int n,int m)

{

	return (((fac[m]*inv[n])%MOD)*inv[m-n])%MOD;

}

int main()

{

	waiting();

	scanf("%d%d%d%d",&n,&m,&a,&b);

	for(int i=1;i<=n-a;i++)

	{

		long long p1=C(b-1,b+i-2);

		long long p2=C(m-b-1,m-b+n-i-1);

		long long p=(p1*p2)%MOD;

		ans=(ans+p)%MOD;

	}

	printf("%lld",ans);

}