Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- int main()
- {
- long long int t,i,x,y,x1,y1,x2,y2;
- scanf("%lld",&t);
- for(i=1;i<=t;i++){
- scanf("%lld %lld %lld %lld",&x1,&y1,&x2,&y2);
- printf("Case %lld: ",i);
- x=abs(x1-x2);
- y=abs(y1-y2);
- if(x==y)
- printf("1\n");
- else if(x%2==y%2)
- printf("2\n");
- else
- printf("impossible\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement