Task: | Vaihdot |
Sender: | Ender |
Submission time: | 2020-10-17 21:03:25 +0300 |
Language: | C++ (C++11) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
#2 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | WRONG ANSWER | 0.01 s | 1, 2 | details |
#2 | WRONG ANSWER | 0.01 s | 2 | details |
Code
#include <bits/stdc++.h> #define ll long long int using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; while(t--) { int x1,x2,y1,y2; cin >> x1 >> x2 >> y1 >> y2; ll ans = 0; ans += abs(x1-y1); ans += abs(x2-y2); if(x1!=y1&&x2!=y2) ans+=2; cout << ans << "\n"; } return 0; }