-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrcb and playoffs
37 lines (32 loc) · 1.07 KB
/
rcb and playoffs
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
31
32
33
34
35
36
37
Problem
Team RCB has earned X points in the games it has played so far in this year's IPL.
To qualify for the playoffs they must earn at least a total of Y points.
They currently have Z games left, in each game they earn 2 points for a win, 1 point for a draw, and no points for a loss.
Is it possible for RCB to qualify for the playoffs this year?
Input Format
First line will contain
T, number of testcases. Then the testcases follow.
Each testcase contains of a single line of input, three integers X,Y,Z.
/* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int i=0;i<t;i++){
int a=sc.nextInt();
int b=sc.nextInt();
int c=sc.nextInt();
if(a+(2*c)>=b){
System.out.println("yes");
}else{
System.out.println("no");
}
}// your code goes here
}
}