想明白之后就是,路径条数
#include<bits/stdc++.h> using namespace std; typedef long long ll; ll a,b,c,d; inline ll read() { ll x=0,w=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') w=-1; c=getchar(); } while(c<='9'&&c>='0') { x=(x<<1)+(x<<3)+c-'0'; c=getchar(); } return w==1?x:-x; } int main() { int T=read(); while(T--) { ll a=read(),b=read(),c=read(),d=read(); ll dx=abs(a-c); ll dy=abs(b-d); ll ans=dx*dy+1; cout<<ans<<endl; } return 0; }