mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-09 16:38:47 +00:00
HDR003A. 「MCOI-06」Flight
https://hydro.ac/record/6156deb33713cfcd8ab56209
This commit is contained in:
parent
cf710ebc13
commit
096f23c71e
16
Hydro/HDR003A/HDR003A.cpp
Normal file
16
Hydro/HDR003A/HDR003A.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user