|
||||||||||||
|
#include<cstdio>
#include<iostream>
#define mod 1000000007
#define LL long long
using namespace std;
LL ans;
int n,m,mx,mn;
int main()
{
scanf("%d%d%d%d",&n,&m,&mn,&mx);
for (int i=3;i<=n;i++)
for (int j=3;j<=m;j++)
{
int w=2*(i+j-2);
if (w<=mx&&w>=mn)ans+=(LL) (n-i+1)*(m-j+1)*(i-2)*(j-2)%mod;
}
printf("%lld\n",(ans*6)%mod);
}
时间: 2024-10-24 16:17:14