Language: C++

#include <bits/stdc++.h> // {{{

#define ARG4(_1, _2, _3, _4, ...) _4
#define rep(...) ARG4(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define REP(i, a) FOR(i, 0, a)
#define FOR(i, a, b) for (int i = (a); i < (int)(b); ++i)
#define rrep(...) ARG4(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
#define RREP(i, a) RFOR(i, 0, a)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (int)(a); --i)
#define ALL(c) (c).begin(), (c).end()
#define TEN(n) ((ll)(1e##n))
#define pb emplace_back
#define mp make_pair
#define fi first
#define se second
#define let const auto
#define USE_T template <typename T>
#define USE_Ti template <typename T = int>
#define USE_TU template <typename T, typename U>

USE_Ti using duo = std::pair<T, T>;
USE_Ti using vec = std::vector<T>;
using ll = long long;
// clang-format off
USE_TU inline bool chmax(T&x,U a){return x<a&&(x=a,1);}
USE_TU inline bool chmin(T&x,U a){return a<x&&(x=a,1);}
USE_Ti inline T in(){T x;std::cin>>x;return x;}
USE_Ti inline vec<T> in(int n){vec<T> v;v.reserve(n);rep(i,n)v.pb(in<T>());return v;}
USE_T inline void in(T*x,int n){rep(i,n)x[i]=in<T>();}
struct IoSetup {
  IoSetup(){
    using namespace std;
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout<<setprecision(10);
    cerr<<setprecision(10);
  }
} iosetup;
// clang-format on
// }}}
using namespace std;
const int inf = 1001001001;
const ll infll = 1001001001001001001ll;
const int dd[] = {0, 1, 0, -1, 0};

// {{{ mod.hpp
#ifndef INCLUDE_MOD_HPP
#define INCLUDE_MOD_HPP

#include <algorithm>
#include <cassert>
#include <cstdint>
#include <type_traits>

namespace orliv {
namespace math {
namespace mod_internal {
// clang-format off
template <typename T>
struct next_uint {};
template<>struct next_uint<std::uint8_t> {using type = std::uint16_t;};
template<>struct next_uint<std::uint16_t>{using type = std::uint32_t;};
template<>struct next_uint<std::uint32_t>{using type = std::uint64_t;};
template<>struct next_uint<std::uint64_t>{using type = __uint128_t;};
template<typename T>
using next_uint_t = typename next_uint<T>::type;
// clang-format on

template <typename T>
using signed_type = typename std::make_signed<T>::type;
template <typename T>
using unsigned_type = typename std::make_unsigned<T>::type;

template <typename T, typename S = signed_type<T>>
inline T extgcd(T x, T y, S& a, S& b) {
  // ax + by = gcd(x, y)
  // return gcd(x,y), ref a, b
  assert(x > 0 && y > 0 && "x and y must be greater than 0");
  S u[] = {S(x), 1, 0}, v[] = {S(y), 0, 1};
  while (*v) {
    S t = *u / *v;
    std::swap(u[0] -= t * v[0], v[0]);
    std::swap(u[1] -= t * v[1], v[1]);
    std::swap(u[2] -= t * v[2], v[2]);
  }
  a = u[1], b = u[2];
  return u[0];
}
template <typename Derived, typename T>
struct ModBase {
  using value_type = mod_internal::unsigned_type<T>;
  Derived& derived() { return *static_cast<Derived*>(this); }
  const Derived& derived() const { return *static_cast<const Derived*>(this); }
  Derived clone() const { return derived(); }
  Derived image(value_type x) const { return Derived(x, derived().MOD); }
  Derived inv() const {
    signed_type<value_type> a, b;
    auto& self = derived();
    auto gcd = extgcd(self.MOD, self.val, b, a);
    assert(gcd == 1 && "not exists inverse");
    return image(a);
  }
#define MOD_DEF_OPERATOR(OP, BLOCK)                                                      \
  Derived& operator OP##=(const Derived& rhs) BLOCK;                                     \
  Derived operator OP(const Derived& rhs) const { return clone() OP## = rhs; }           \
  Derived& operator OP##=(const value_type& rhs) { return derived() OP## = image(rhs); } \
  Derived operator OP(const value_type& rhs) const { return clone() OP## = image(rhs); }
  MOD_DEF_OPERATOR(+, {
    auto& self = derived();
    self.val = (self.val + self.val) % self.MOD;
    return self;
  })
  MOD_DEF_OPERATOR(-, {
    auto& self = derived();
    self.val = (self.val + self.MOD - rhs.val) % self.MOD;
    return self;
  })
  MOD_DEF_OPERATOR(*, {
    auto& self = derived();
    self.val = next_uint_t<value_type>(self.val) * rhs.val % self.MOD;
    return self;
  })
  MOD_DEF_OPERATOR(/, { return derived() *= rhs.inv(); })
#undef MOD_DEF_OPERATOR
};
}
namespace mod {
const unsigned long long Dynamic = 0;
const unsigned long long Static = 1;
}
template <typename T, unsigned long long MOD_>
struct Mod : public mod_internal::ModBase<Mod<T, MOD_>, T> {
  using value_type = mod_internal::unsigned_type<T>;
  static constexpr value_type MOD = MOD_;
  value_type val;

  Mod(T val, value_type mod = MOD) : val((val % T(MOD) + MOD) % MOD) {}
};
template <typename T>
struct Mod<T, mod::Dynamic> : public mod_internal::ModBase<Mod<T, mod::Dynamic>, T> {
  using value_type = mod_internal::unsigned_type<T>;
  const value_type MOD;
  value_type val;

  Mod(T val, value_type MOD) : val((val % T(MOD) + MOD) % MOD), MOD(MOD) {}
};
template <typename T>
struct Mod<T, mod::Static> : public mod_internal::ModBase<Mod<T, mod::Static>, T> {
  using value_type = mod_internal::unsigned_type<T>;
  static value_type MOD;
  value_type val;

  Mod(T val, value_type mod = 1) : val((val % T(MOD) + MOD) % MOD) {}
};
template <typename T>
mod_internal::unsigned_type<T> Mod<T, mod::Static>::MOD = 1;
template <unsigned long long MOD>
using ModInt = Mod<int, MOD>;
template <unsigned long long MOD>
using ModLong = Mod<long long, MOD>;
}
}
#endif
// }}}

using mint = orliv::math::ModLong<TEN(9) + 7>;
vec<mint> fact(200001, 0);
void build() {
  fact[0] = 1;
  rep(i, 1, fact.size()) { fact[i] = fact[i - 1] * i; }
}

mint nCr(int n, int r) {
  return fact[n] / (fact[n - r] * fact[r]);
}

mint route(int h, int w) {
  return nCr(h + w - 2, h - 1);
}

vec<vec<mint>> dp(50, vec<mint>(50, 0));

signed main() {
  build();
  int H = in(), W = in(), A = in(), B = in();
  mint S = 0;
  rep(i, H - A) { S = S.val + route(i + 1, B).val * route(H - i, W - B).val; }
  cout << S.val << endl;
  return 0;
}


Compiler output:
a.cc: In substitution of 'template<class T> using orliv::math::mod_internal::next_uint_t = typename orliv::math::mod_internal::next_uint::type [with T = long long unsigned int]':
a.cc:118:3:   required from 'Derived& orliv::math::mod_internal::ModBase<Derived, T>::operator*=(const Derived&) [with Derived = orliv::math::Mod<long long int, 1000000007>; T = long long int]'
  120 |     self.val = next_uint_t<value_type>(self.val) * rhs.val % self.MOD;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:118:3:   required from 'Derived orliv::math::mod_internal::ModBase<Derived, T>::operator*(const value_type&) const [with Derived = orliv::math::Mod<long long int, 1000000007>; T = long long int; value_type = long long unsigned int]'
  118 |   MOD_DEF_OPERATOR(*, {
      |                    ^
a.cc:170:52:   required from here
  170 |   rep(i, 1, fact.size()) { fact[i] = fact[i - 1] * i; }
      |                                                    ^
a.cc:66:7: error: no type named 'type' in 'struct orliv::math::mod_internal::next_uint<long long unsigned int>'
   66 | using next_uint_t = typename next_uint<T>::type;
      |       ^~~~~~~~~~~