Advertisement
rahat62

Toph- Alice and the Chessboard

Jan 30th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. int main()
  4. {
  5.    int t,a,b,c,d,i=0;
  6.  
  7.    scanf("%d",&t);
  8.  
  9.    for(i=0;i<t;i++)
  10.    {
  11.        scanf("%d%d%d%d",&a,&b,&c,&d);
  12.        if(abs(a-c)==abs(b-d))
  13.        {
  14.            printf("Yes\n");
  15.        }
  16.        else
  17.         printf("No\n");
  18.  
  19.    }
  20.  
  21.    return 0;
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement