-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy patha.java
30 lines (29 loc) · 900 Bytes
/
a.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import java.io.*;
import java.util.*;
public class a{
static BufferedReader br;
static PrintWriter pw;
static long T, r, b, d;
public static void main(String args[]) throws IOException{
br = new BufferedReader(new InputStreamReader(System.in));
pw = new PrintWriter(System.out);
T = Integer.parseInt(br.readLine());
while(T-- > 0){
StringTokenizer st = new StringTokenizer(br.readLine());
r = Integer.parseInt(st.nextToken());
b = Integer.parseInt(st.nextToken());
d = Integer.parseInt(st.nextToken());
if(r < b){
long tmp = r;
r = b;
b = tmp;
}
if((d + 1) * b < r){
pw.println("NO");
}else{
pw.println("YES");
}
}
br.close(); pw.close();
}
}