SHARE
TWEET

Untitled

a guest Dec 3rd, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits/stdc++.h>
  2. #define db double
  3. using namespace std;
  4. int main ()
  5. {
  6.     int n;
  7.  
  8.     cin >>n;
  9.  
  10.  
  11.     while (n--)
  12.     {
  13.         cin >>a>>b;
  14.  
  15.     db ma ,mi;
  16.  
  17.    ma= max (a,b);
  18.    mi = min (a,b);
  19.  
  20.    db x = ma - mi ;
  21.  
  22.    if (x*2==mi)
  23.     cout <<"yes"<<endl;
  24.    else
  25.     cout<<"no"<<endl;
  26.  
  27.     }
  28.     return 0;
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top