#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main()
{
// your code goes here
int t, e, f, g, h;
cin >> t;
while (t--)
{
cin >> e >> f;
cin >> g >> h;
int z = e + f;
int q = g + h;
if (e == g && f == h)
{
cout << "0";
}
else if ((z % 2 == 0 && q % 2 == 0) || (z % 2 != 0 && q % 2 != 0))
{
cout << "2";
}
else if ((z % 2 == 0 && q % 2 != 0) || (z % 2 != 0 && q % 2 == 0))
{
cout << "1";
}
cout << endl;
}
return 0;
}
3 Comments
only one test passed
ReplyDeleteCheck Now brother. Its working. correct answer.
DeleteThis comment has been removed by a blog administrator.
ReplyDelete