func_code_string: #include <bits/stdc++.h>   #pragma comment(linker,  /STACK:1024000000,1024000000 )   using namespace std;   void output(long long x) {     if (x < 0) putchar( - ), x = -x;     if (x == 0) {       putchar( 0 );       return;     }     int a[20], num = 0;     while (x) a[++num] = x % 10, x /= 10;     while (num > 0) putchar( 0  + a[num--]);   }   inline long long myInt() {     char c = getchar();     while (!isdigit(c) && c !=  - ) c = getchar();     int flag = 1;     if (c ==  - ) flag = -1, c = getchar();     long long x = 0;     while (isdigit(c)) {       x = (x * 10) + (c -  0 );       c = getchar();     }     if (-1 == flag) return -x;     return x;   }   const long long mod = 1000000007;   const int N = 2005;   int h, w, n;   struct node {     int x, y;   };   node a[N];   long long f[N];   long long p[200005];   long long myPow(long long x, long long y) {     long long ans = 1;     while (y) {       if (y & 1) ans = ans * x % mod;       x = x * x % mod;       y >>= 1;     }     return ans;   }   long long reverse(long long x) { return myPow(x, mod - 2); }   long long C(long long x, long long y) {     if (x < y) return 0;     if (x == y || y == 0) return 1;     return p[x] * reverse(p[y] * p[x - y] % mod) % mod;   }   long long cal(node from, node to) {     int xx = ((from.x - to.x) >= 0 ? (from.x - to.x) : -(from.x - to.x));     int yy = ((from.y - to.y) >= 0 ? (from.y - to.y) : -(from.y - to.y));     return C(xx + yy, xx);   }   int cmp(node a, node b) {     if (a.x != b.x) return a.x < b.x;     return a.y < b.y;   }   int main() {     h = myInt();     w = myInt();     n = myInt();     for (int i = 1; i <= n; i++) {       a[i].x = myInt();       a[i].y = myInt();     }     p[0] = 1;     for (int i = 1; i <= 200000; i++) {       p[i] = p[i - 1] * i % mod;     }     sort(a + 1, a + n + 1, cmp);     node E;     E.x = h;     E.y = w;     for (int i = n; i >= 1; i--) {       for (int j = i + 1; j <= n; j++) {         if (a[i].x <= a[j].x && a[i].y <= a[j].y) {           f[i] -= cal(a[i], a[j]) * f[j];           f[i] %= mod;         }       }       f[i] += cal(a[i], E);       f[i] %= mod;     }     node S;     S.x = 1;     S.y = 1;     long long ans = 0;     for (int i = 1; i <= n; i++) {       ans += f[i] * cal(S, a[i]);       ans %= mod;     }     if (ans < 0) ans += mod;     ans = cal(S, E) - ans;     ans %= mod;     if (ans < 0) ans += mod;     printf( %d n , (int)ans);   }   