diff --git a/Luogu/problem/P7885/P7885.cpp b/Luogu/problem/P7885/P7885.cpp new file mode 100644 index 00000000..3442d17d --- /dev/null +++ b/Luogu/problem/P7885/P7885.cpp @@ -0,0 +1,16 @@ +#include + +using namespace std; + +long long t, a, b, c, d, x, y, k; + +int main() { + cin >> t; + while (t--) { + cin >> a >> b >> c >> d; + x = abs(a - c); + y = abs(b - d); + cout << max(x, y) * 2 - !(x % 2 == 0 && y % 2 == 0 || x % 2 && y % 2) << endl; + } + return 0; +}