#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i < (n); i++)
#define all(v) (v).begin(), (v).end()
#define pb(a) push_back(a)
using namespace std;
typedef long long LL;
const LL INF = 999999999999;

int main(){
    int q;
    cin >> q;
    rep(i, q){
        int a,b,c,d;
        cin >> a >> b >> c >> d;
        a--;b--;c--;d--;
        int ans = 0;
        for(int i=a; i<=c; i++){
            for(int j=b; j<=d; j++){
                if(i%2==0 && j%2==1) continue;
                else ans++;
            }
        }
        cout << ans << endl;
    }

}

