Advertisement
Promi_38

cf 1519A

May 1st, 2021
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5.     int t;
  6.     scanf("%d", &t);
  7.    
  8.     while(t--)
  9.     {
  10.         long long r, b, d;
  11.         scanf("%lld %lld %lld", &r, &b, &d);
  12.        
  13.         if(r > b)
  14.         {
  15.             if(r > b*(d+1)) printf("NO\n");
  16.             else printf("YES\n");
  17.         }
  18.         else
  19.         {
  20.             if(b > r*(d+1)) printf("NO\n");
  21.             else printf("YES\n");
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement