#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
ll i,j,k,l,m,n,test;
cin>>test;
for(k=1;k<=test;k++)
{
ll a,b,c,d;
cin>>a>>b;
cin>>c>>d;
cout<<"Case "<<k<<": ";
if(abs(a-c)%2!=abs(b-d)%2)
{
cout<<"impossible"<<endl;
continue;
}
if(abs(a-c)==abs(b-d))
cout<<1;
else
cout<<2;
cout<<endl;
}
return 0;
}
using namespace std;
typedef long long ll;
int main()
{
ll i,j,k,l,m,n,test;
cin>>test;
for(k=1;k<=test;k++)
{
ll a,b,c,d;
cin>>a>>b;
cin>>c>>d;
cout<<"Case "<<k<<": ";
if(abs(a-c)%2!=abs(b-d)%2)
{
cout<<"impossible"<<endl;
continue;
}
if(abs(a-c)==abs(b-d))
cout<<1;
else
cout<<2;
cout<<endl;
}
return 0;
}
No comments:
Post a Comment