Language: C++

#include <bits/stdc++.h>
using namespace std;
const int mod=1e9+7;
int fac[2000007],inv[2000007];
int x1,x2,x3,x4,x5,x6;
int y1,y2,y3,y4,y5,y6;
void init(){
	fac[0]=1;fac[1]=1;inv[0]=1;inv[1]=1;
	for(int i=2;i<2000007;i++){
		fac[i]=1ll*fac[i-1]*i%mod;
		inv[i]=1ll*(mod-mod/i)*inv[mod%i]%mod;
	}
	for(int i=2;i<2000007;i++){
		inv[i]=1ll*inv[i]*inv[i-1]%mod;
	}
}
int c(int x,int y){
	return 1ll*fac[x]*inv[y]%mod*inv[x-y]%mod;
}
int f(int x,int y){
	return c(x+y,x);
}
int calc(int xs,int ys,int xt,int yt){
	int s=0,i;
	y3--;
	for(i=x3;i<=x4;i++){
		s=(s+1ll*f(i-xs,y4-ys)*f(xt-i,yt-y4-1)%mod*(i-xs+y4-ys))%mod;
		s=(s-1ll*f(i-xs,y3-ys)*f(xt-i,yt-y3-1)%mod*(i-xs+y3-ys))%mod;
	}
	y3++;
	x3--;
	for(i=y3;i<=y4;i++){
		s=(s+1ll*f(x4-xs,i-ys)*f(xt-x4-1,yt-i)%mod*(x4-xs+i-ys))%mod;
		s=(s-1ll*f(x3-xs,i-ys)*f(xt-x3-1,yt-i)%mod*(x3-xs+i-ys))%mod;
	}
	x3++;
	return s;
}
int main(){
	init();
	int ans=0;
	scanf("%d%d%d%d%d%d",&x1,&x2,&x3,&x4,&x5,&x6);
	scanf("%d%d%d%d%d%d",&y1,&y2,&y3,&y4,&y5,&y6);
	vector<pair<pair<int,int>,int> > v1,v2;
	v1.push_back(make_pair(make_pair(x1-1,y1-1),1));
	v1.push_back(make_pair(make_pair(x1-1,y2),-1));
	v1.push_back(make_pair(make_pair(x2,y1-1),-1));
	v1.push_back(make_pair(make_pair(x2,y2),1));
	v2.push_back(make_pair(make_pair(x6+1,y6+1),1));
	v2.push_back(make_pair(make_pair(x6+1,y5),-1));
	v2.push_back(make_pair(make_pair(x5,y6+1),-1));
	v2.push_back(make_pair(make_pair(x5,y5),1));
	for(int i=0;i<v1.size();i++){
		for(int j=0;j<v2.size();j++){
			ans=(ans+calc(v1[i].first.first,v1[i].first.second,v2[j].first.first,v2[j].first.second)*v1[i].second*v2[j].second)%mod;
		}
	}
	printf("%d\n",(ans+mod)%mod);
	return 0;
}

Compiler output:
a.cc:6:5: error: 'int y1' redeclared as different kind of entity
    6 | int y1,y2,y3,y4,y5,y6;
      |     ^~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:33,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:257:1: note: previous declaration 'double y1(double)'
  257 | __MATHCALL (y1,, (_Mdouble_));
      | ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:45:49: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   45 |         v1.push_back(make_pair(make_pair(x1-1,y1-1),1));
      |                                               ~~^~
a.cc:45:21: error: no matching function for call to 'std::vector<std::pair<std::pair<int, int>, int> >::push_back(std::pair<std::pair<int, double (*)(double) noexcept>, int>)'
   45 |         v1.push_back(make_pair(make_pair(x1-1,y1-1),1));
      |         ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<std::pair<int, int>, int>; _Alloc = std::allocator<std::pair<std::pair<int, int>, int> >; value_type = std::pair<std::pair<int, int>, int>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from 'std::pair<std::pair<int, double (*)(double) noexcept>, int>' to 'const std::vector<std::pair<std::pair<int, int>, int> >::value_type&' {aka 'const std::pair<std::pair<int, int>, int>&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::pair<std::pair<int, int>, int>; _Alloc = std::allocator<std::pair<std::pair<int, int>, int> >; value_type = std::pair<std::pair<int, int>, int>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from 'std::pair<std::pair<int, double (*)(double) noexcept>, int>' to 'std::vector<std::pair<std::pair<int, int>, int> >::value_type&&' {aka 'std::pair<std::pair<int, int>, int>&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
a.cc:47:47: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   47 |         v1.push_back(make_pair(make_pair(x2,y1-1),-1));
      |                                             ~~^~
a.cc:47:21: error: no matching function for call to 'std::vector<std::pair<std::pair<int, int>, int> >::push_back(std::pair<std::pair<int, double (*)(double) noexcept>, int>)'
   47 |         v1.push_back(make_pair(make_pair(x2,y1-1),-1));
      |         ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<std::pair<int, int>, int>; _Alloc = std::allocator<std::pair<std::pair<int, int>, int> >; value_type = std::pair<std::pair<int, int>, int>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from 'std::pair<std::pair<int, double (*)(double) noexcept>, int>' to 'const std::vector<std::pair<std::pair<int, int>, int> >::value_type&' {aka 'const std::pair<std::pair<int, int>, int>&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::pair<std::pair<int, int>, int>; _Alloc = std::allocator<std::pair<std::pair<int, int>, int> >; value_type = std::pair<std::pair<int, int>, int>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from 'std::pair<std::pair<int, double (*)(double) noexcept>, int>' to 'std::vector<std::pair<std::pair<int, int>, int> >::value_type&&' {aka 'std::pair<std::pair<int, int>, int>&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~