讨论坏点的左右上下的矩形大小。
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
long long a, b, x, y;
cin >> a >> b >> x >> y;
// cout<<a<<" "<<b<<" "<<x<<" "<<y<<endl;
long long ans = 0;
ans = max(ans, x * b);
ans = max(ans, a * y);
ans = max(ans, a * ( b-y-1));
// cout<<x * ( b-y)<<endl;
ans = max(ans, (a-x-1) *b);
cout<<ans<<endl;
}
}