-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNewClass.java
38 lines (34 loc) · 905 Bytes
/
NewClass.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
31
32
33
34
35
36
37
38
package codeforces;
import java.util.*;
public class NewClass {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
//System.out.println(0%1);
int T=sc.nextInt();
for (int t=0; t<T; t++) {
int a=sc.nextInt();
int b=sc.nextInt();
int c=sc.nextInt();
if ((a%2!=0)&&((b%2!=0))&&c>1) {
System.out.println("NO");
}
else if(((a%2!=0)&&((b%2!=0))&&c==1)){System.out.println("YES");}
else if(((a%2==0)&&((b%2==0))&&)){System.out.println("YES");}
else {
if ((a%2==0)&&(b%2!=0)) {
if(a>=c){System.out.println("YES");}
else{System.out.println("NO");}
}
else if ((a%2!=0)&&(b%2==0)) {
if(b>=c){System.out.println("YES");}
else{System.out.println("NO");}
}
else {
int x=a+b;
if(x>=c){System.out.println("YES");}
else{System.out.println("NO");}
}
}
}
}
}