Language: C++

#include<bits/stdc++.h>
using namespace std;
#define Max(x,y) ((x)>(y)?(x):(y))
#define Min(x,y) ((x)<(y)?(x):(y))
#define ll long long
#define ls o<<1
#define rs o<<1|1
const int N=20+10,M=2000+10,inf=0x3f3f3f3f;
const ll P=1e9+7;
ll n,c[N];
template<class t>void rd(t &x){
    x=0;int w=0;char ch=0;
    while(!isdigit(ch)) w|=ch=='-',ch=getchar();
    while(isdigit(ch)) x=(x<<1)+(x<<3)+(ch^48),ch=getchar();
    x=w?-x:x;
}

void Mod(ll &x){x=(x>=P)?x-P:x;}
ll C(int x,int y){return (fac[x]*ifac[y]%P)*ifac[x-y]%P;}
ll qpow(ll x,ll y){
	ll ret=1ll;
	while(y){
		if(y&1) ret=ret*x%P;
		x=x*x%P,y>>=1;
	}
	return ret;
}

int main(){
#ifndef ONLINE_JUDGE
    freopen("in.txt","r",stdin);
#endif
	rd(n);
	for(int i=1;i<=n;++i) rd(a[i]),rd(b[i]),++f[M-a[i]][M-b[i]];
	for(int i=1;i<=(M<<1);++i)
		for(int j=1;j<=(M<<1);++j)
			f[i][j]+=f[i-1][j],Mod(f[i][j]),f[i][j]+=f[i][j-1],Mod(f[i][j]);
	fac[0]=fac[1]=1ll;
	for(int i=2;i<=(M<<2);++i) fac[i]=fac[i-1]*(ll)i%P;
	ifac[M<<2]=qpow(fac[M<<2],P-2);
	for(int i=(M<<2);i;--i) ifac[i-1]=ifac[i]*i%P;
	for(int i=1;i<=n;++i) ans+=f[M+a[i]][M+b[i]],Mod(ans),ans+=(P-C(((a[i]+b[i])<<1),(a[i]<<1))),Mod(ans);
	printf("%lld",ans*inv2%P);
    return 0; 
}

Compiler output:
a.cc: In function 'long long int C(int, int)':
a.cc:19:27: error: 'fac' was not declared in this scope
   19 | ll C(int x,int y){return (fac[x]*ifac[y]%P)*ifac[x-y]%P;}
      |                           ^~~
a.cc:19:34: error: 'ifac' was not declared in this scope
   19 | ll C(int x,int y){return (fac[x]*ifac[y]%P)*ifac[x-y]%P;}
      |                                  ^~~~
a.cc: In function 'int main()':
a.cc:34:34: error: 'a' was not declared in this scope
   34 |         for(int i=1;i<=n;++i) rd(a[i]),rd(b[i]),++f[M-a[i]][M-b[i]];
      |                                  ^
a.cc:34:43: error: 'b' was not declared in this scope
   34 |         for(int i=1;i<=n;++i) rd(a[i]),rd(b[i]),++f[M-a[i]][M-b[i]];
      |                                           ^
a.cc:34:51: error: 'f' was not declared in this scope
   34 |         for(int i=1;i<=n;++i) rd(a[i]),rd(b[i]),++f[M-a[i]][M-b[i]];
      |                                                   ^
a.cc:37:25: error: 'f' was not declared in this scope
   37 |                         f[i][j]+=f[i-1][j],Mod(f[i][j]),f[i][j]+=f[i][j-1],Mod(f[i][j]);
      |                         ^
a.cc:38:9: error: 'fac' was not declared in this scope
   38 |         fac[0]=fac[1]=1ll;
      |         ^~~
a.cc:40:9: error: 'ifac' was not declared in this scope
   40 |         ifac[M<<2]=qpow(fac[M<<2],P-2);
      |         ^~~~
a.cc:42:31: error: 'ans' was not declared in this scope; did you mean 'abs'?
   42 |         for(int i=1;i<=n;++i) ans+=f[M+a[i]][M+b[i]],Mod(ans),ans+=(P-C(((a[i]+b[i])<<1),(a[i]<<1))),Mod(ans);
      |                               ^~~
      |                               abs
a.cc:42:36: error: 'f' was not declared in this scope
   42 |         for(int i=1;i<=n;++i) ans+=f[M+a[i]][M+b[i]],Mod(ans),ans+=(P-C(((a[i]+b[i])<<1),(a[i]<<1))),Mod(ans);
      |                                    ^
a.cc:42:40: error: 'a' was not declared in this scope
   42 |         for(int i=1;i<=n;++i) ans+=f[M+a[i]][M+b[i]],Mod(ans),ans+=(P-C(((a[i]+b[i])<<1),(a[i]<<1))),Mod(ans);
      |                                        ^
a.cc:42:48: error: 'b' was not declared in this scope
   42 |         for(int i=1;i<=n;++i) ans+=f[M+a[i]][M+b[i]],Mod(ans),ans+=(P-C(((a[i]+b[i])<<1),(a[i]<<1))),Mod(ans);
      |                                                ^
a.cc:43:23: error: 'ans' was not declared in this scope; did you mean 'abs'?
   43 |         printf("%lld",ans*inv2%P);
      |                       ^~~
      |                       abs
a.cc:43:27: error: 'inv2' was not declared in this scope
   43 |         printf("%lld",ans*inv2%P);
      |                           ^~~~