CSES - Putka Open 2020 – 3/5 - Results
Submission details
Task:Vaihdot
Sender:Ender
Submission time:2020-10-17 21:03:25 +0300
Language:C++11
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
Test results
testverdicttimegroup
#10.01 s1, 2details
#20.01 s2details

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;
}

Test details

Test 1

Group: 1, 2

Verdict:

input
1000
1
1
2
1 2
...

correct output
0
0
-1
0
-1
...

user output
1
1
5
1
5
...

Test 2

Group: 2

Verdict:

input
1000
79
49 42 77 41 37 61 46 55 7 72 4...

correct output
81
67 79
70 78
3 77
60 76
...

user output
67
31
52
96
110
...