Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using static System.Math;
using static System.Array;
using static AtCoder.Tool;
using static AtCoder.CalcL;
namespace AtCoder
{
    class AC
    {
        const int MOD = 1000000007;
        //const int MOD = 998244353;
        const int INF = int.MaxValue / 2;
        const long SINF = long.MaxValue / 2;
        const double EPS = 1e-8;
        static readonly int[] dI = { 0, 1, 0, -1 };
        static readonly int[] dJ = { 1, 0, -1, 0 };
        //static List<List<int>> G = new List<List<int>>();
        //static List<List<Edge>>G = new List<List<Edge>>();
        //static List<Edge> E = new List<Edge>();
        static void Main(string[] args)
        {
            //var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
            //Console.SetOut(sw);
            var cin = new Scanner();

            var input = cin.ReadSplitInt();
            int H = input[0];
            int W = input[1];
            int A = input[2];
            int B = input[3];
            long ans = 0;
            long prev = 0;
            var md = new Modulo(200010);
            for(var i = 0; i < H - A; i++)
            {
                ans += md.Mul(((md.Ncr(i + B, i) - prev + MOD) % MOD), md.Ncr(W - 1 - B + (H - 1 - i), (H - 1 - i)));
                ans %= MOD;
                prev = md.Ncr(i + B, i);
            }
            Console.WriteLine(ans);

            //Console.Out.Flush();
        }
        struct Edge
        {
            public int from;

            public int to;
            public long dist;
            public Edge(int t, long c)
            {
                from = -1;
                to = t;
                dist = c;
            }
            public Edge(int f, int t, long c)
            {
                from = f;
                to = t;
                dist = c;
            }

        }
    }
    public class Scanner
    {
        public int[] ReadSplitInt()
        {
            return ConvertAll(Console.ReadLine().Split(), int.Parse);
        }
        public long[] ReadSplitLong()
        {
            return ConvertAll(Console.ReadLine().Split(), long.Parse);
        }
        public double[] ReadSplit_Double()
        {
            return ConvertAll(Console.ReadLine().Split(), double.Parse);
        }
    }
    public static class Tool
    {
        static public void Initialize<T>(ref T[] array, T initialvalue)
        {
            for (var i = 0; i < array.Length; i++)
            {
                array[i] = initialvalue;
            }
        }
        static public void Swap<T>(ref T a, ref T b)
        {
            T keep = a;
            a = b;
            b = keep;
        }

        static public void Display<T>(T[,] array2d, int n, int m)
        {
            for (var i = 0; i < n; i++)
            {
                for (var j = 0; j < m; j++)
                {
                    Console.Write($"{array2d[i, j]} ");
                }
                Console.WriteLine();
            }
        }

        static public long LPow(int a, int b)
        {
            return (long)Pow(a, b);
        }
    }
    static public class CalcI
    {
        public static int Gcd(int a, int b)
        {
            if (a * b == 0) { return Max(a, b); }
            return a % b == 0 ? b : Gcd(b, a % b);
        }
        public static int Lcm(int a, int b)
        {
            int g = Gcd(a, b);
            return a / g * b;
        }
        public static int Ceil(int n, int div)
        {
            return (n + div - 1) / div;
        }
    }
    static public class CalcL
    {
        public static long Gcd(long a, long b)
        {
            if (a * b == 0) { return Max(a, b); }
            return a % b == 0 ? b : Gcd(b, a % b);
        }
        public static long Lcm(long a, long b)
        {
            long g = Gcd(a, b);
            return a / g * b;
        }
        public static long Ceil(long n, long div)
        {
            return (n + div - 1) / div;
        }
    }
    class Modulo
    {
        private const long M = 1000000007;
        //private const int M = 998244353;
        private readonly long[] m_facs;
        public long Mul(long a, long b)
        {
            return ((a * b) % M);
        }
        public Modulo(long n)
        {
            m_facs = new long[n + 1];
            m_facs[0] = 1;
            for (long i = 1; i <= n; ++i)
            {
                m_facs[i] = Mul(m_facs[i - 1], i);
            }
        }
        public long Fac(long n)
        {
            return m_facs[n];
        }
        public long Pow(long a, long m)
        {
            switch (m)
            {
                case 0:
                    return 1L;
                case 1:
                    return a;
                default:
                    long p1 = Pow(a, m / 2);
                    long p2 = Mul(p1, p1);
                    return ((m % 2) == 0) ? p2 : Mul(p2, a);
            }
        }
        public long Div(long a, long b)
        {
            return Mul(a, Pow(b, M - 2));
        }
        public long Ncr(long n, long r)
        {
            if (n < r) { return 0; }
            if (n == r) { return 1; }
            long res = Fac(n);
            res = Div(res, Fac(r));
            res = Div(res, Fac(n - r));
            return res;
        }
        public Modulo() { }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.IO;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Text;
      |       ^~~~~~
a.cc:6:7: error: expected nested-name-specifier before 'static'
    6 | using static System.Math;
      |       ^~~~~~
a.cc:7:7: error: expected nested-name-specifier before 'static'
    7 | using static System.Array;
      |       ^~~~~~
a.cc:8:7: error: expected nested-name-specifier before 'static'
    8 | using static AtCoder.Tool;
      |       ^~~~~~
a.cc:9:7: error: expected nested-name-specifier before 'static'
    9 | using static AtCoder.CalcL;
      |       ^~~~~~
a.cc:19:16: error: 'readonly' does not name a type
   19 |         static readonly int[] dI = { 0, 1, 0, -1 };
      |                ^~~~~~~~
a.cc:20:16: error: 'readonly' does not name a type
   20 |         static readonly int[] dJ = { 1, 0, -1, 0 };
      |                ^~~~~~~~
a.cc:24:26: error: 'string' has not been declared
   24 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:24:35: error: expected ',' or '...' before 'args'
   24 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:50:19: error: expected ':' before 'int'
   50 |             public int from;
      |                   ^~~~
      |                   :
a.cc:52:19: error: expected ':' before 'int'
   52 |             public int to;
      |                   ^~~~
      |                   :
a.cc:53:19: error: expected ':' before 'long'
   53 |             public long dist;
      |                   ^~~~~
      |                   :
a.cc:54:19: error: expected ':' before 'Edge'
   54 |             public Edge(int t, long c)
      |                   ^~~~~
      |                   :
a.cc:60:19: error: expected ':' before 'Edge'
   60 |             public Edge(int f, int t, long c)
      |                   ^~~~~
      |                   :
a.cc:67:10: error: expected ';' after struct definition
   67 |         }
      |          ^
      |          ;
a.cc:68:6: error: expected ';' after class definition
   68 |     }
      |      ^
      |      ;
a.cc:16:25: error: expected primary-expression before 'int'
   16 |         const int INF = int.MaxValue / 2;
      |                         ^~~
a.cc:17:27: error: expected primary-expression before 'long'
   17 |         const long SINF = long.MaxValue / 2;
      |                           ^~~~
a.cc: In static member function 'static void AtCoder::AC::Main(int*)':
a.cc:28:13: error: 'var' was not declared in this scope
   28 |             var cin = new Scanner();
      |             ^~~
a.cc:30:17: error: expected ';' before 'input'
   30 |             var input = cin.ReadSplitInt();
      |                 ^~~~~
a.cc:31:21: error: 'input' was not declared in this scope; did you mean 'int'?
   31 |             int H = input[0];
      |                     ^~~~~
      |                     int
a.cc:37:17: error: expected ';' before 'md'
   37 |             var md = new Modulo(200010);
      |                 ^~
a.cc:38:21: error: expected ';' before 'i'
   38 |             for(var i = 0; i < H - A; i++)
      |                     ^
a.cc:38:28: error: 'i' was not declared in this scope
   38 |             for(var i = 0; i < H - A; i++)
      |                            ^
a.cc:40:24: error: 'md' was not declared in this scope
   40 |                 ans += md.Mul(((md.Ncr(i + B, i) - prev + MOD) % MOD), md.Ncr(W - 1 - B + (H - 1 - i), (H - 1 - i)));
      |                        ^~
a.cc:40:59: error: invalid use of member 'AtCoder::AC::MOD' in static member function
   40 |                 ans += md.Mul(((md.Ncr(i + B, i) - prev + MOD) % MOD), md.Ncr(W - 1 - B + (H - 1 - i), (H - 1 - i)));
      |                                                           ^~~
a.cc:14:19: note: declared here
   14 |         const int MOD = 1000000007;
      |                   ^~~
a.cc:40:66: error: invalid use of member 'AtCoder::AC::MOD' in static member function
   40 |                 ans += md.Mul(((md.Ncr(i + B, i) - prev + MOD) % MOD), md.Ncr(W - 1 - B + (H - 1 - i), (H - 1 - i)));
      |                                                                  ^~~
a.cc:14:19: note: declared here
   14 |         const int MOD = 1000000007;
      |                   ^~~
a.cc:41:24: error: invalid use of member 'AtCoder::AC::MOD' in static member function
   41 |                 ans %= MOD;
      |                        ^~~
a.cc:14:19: note: declared here
   14 |         const int MOD = 1000000007;
      |                   ^~~
a.cc:44:13: error: 'Console' was not declared in this scope
   44 |             Console.WriteLine(ans);
      |             ^~~~~~~
a.cc: At global scope:
a.cc:69:5: error: expected unqualified-id before 'public'
   69 |     public class Scanner
      |     ^~~~~~
a.cc:84:5: error: expected unqualified-id before 'public'
   84 |     public static class Tool
      |     ^~~~~~
a.cc:117:12: error: expected unqualified-id before 'public'
  117 |     static public class CalcI
      |            ^~~~~~
a.cc:134:12: error: expected unqualified-id before 'public'
  134 |     static public class CalcL
      |            ^~~~~~
a.cc:153:16: error: expected ':' before 'const'
  153 |         private const long M = 1000000007;
      |                ^~~~~~
      |                :
a.cc:155:16: error: expected ':' before 'readonly'
  155 |         private readonly long[] m_facs;
      |                ^~~~~~~~~
      |                :
a.cc:155:17: error: 'readonly' does not name a type
  155 |         private readonly long[] m_facs;
      |                 ^~~~~~~~
a.cc:156:15: error: expected ':' before 'long'
  156 |         public long Mul(long a, long b)
      |               ^~~~~
      |               :
a.cc:160:15: error: expected ':' before 'Modulo'
  160 |         public Modulo(long n)
      |               ^~~~~~~
      |               :
a.cc:169:15: error: expected ':' before 'long'
  169 |         public long Fac(long n)
      |               ^~~~~
      |               :
a.cc:173:15: error: expected ':' before 'long'
  173 |         public long Pow(long a, long m)
      |               ^~~~~
      |               :
a.cc:187:15: error: expected ':' before 'long'
  187 |         public long Div(long a, long b)
      |               ^~~~~
      |               :
a.cc:191:15: error: expected ':' before 'long'
  191 |         public long Ncr(long n, long r)
      |               ^~~~~
      |               :
a.cc:200:15: error: expected ':' before 'Modulo'
  200 |         public Modulo() { }
      |               ^~~~~~~
      |               :
a.cc:201:6: error: expected ';' after class definition
  201 |     }
      |      ^
      |      ;
a.cc: In constructor 'AtCoder::Modulo::Modulo(long int)':
a.cc:162:13: error: 'm_facs' was not declared in this scope
  162 |             m_facs = new long[n + 1];
      |             ^~~~~~
a.cc: In member function 'long int AtCoder::Modulo::Fac(long int)':
a.cc:171:20: error: 'm_facs' was not declared in this scope
  171 |             return m_facs[n];
      |                    ^~~~~~