#include #include using namespace std; int main() { int t; cin >> t; while(t--) { int x1, y1, x2, y2; int m = 0; cin >> x1 >> y1 >> x2 >> y2; m += abs(x1-x2); m += abs(y1-y2); if(abs(x1-x2)*abs(y1-y2)) { m += 2; } cout << m << endl; } return 0; }