#include<stdio.h>
#include<iostream>
using namespace std;
int main()
{
int t,tt=1;
scanf("%d",&t);
while(t--)
{
int x,y,x1,y1;
scanf("%d%d%d%d",&x,&y,&x1,&y1);
printf("Case %d: ",tt++);
int tmp1,tmp2;
tmp1=x1-x;
if(tmp1<0)
tmp1=-tmp1;
tmp2=y1-y;
if(tmp2<0)
tmp2=-tmp2;
if(tmp1==tmp2)
printf("1");
else
{
if((tmp1+tmp2)%2==0)
printf("2");
else
printf("impossible");
}
printf("\n");
}
return 0;
}
lightoj 1202
最新推荐文章于 2018-11-06 21:52:00 发布