MCPcopy Create free account
hub / github.com/SR-Sunny-Raj/Hacktoberfest2021-DSA / Codechef

Class Codechef

32. Java Programs/CodeChefProblem_Rectangl.java:8–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7/* Name of the class has to be "Main" only if the class is public. */
8class Codechef
9{
10 public static void main (String[] args) throws java.lang.Exception
11 {
12 // your code goes here
13 Scanner sc=new Scanner(System.in);
14 int a=sc.nextInt();
15 while(a-- >0)
16 {
17
18 int b=sc.nextInt();
19 int c=sc.nextInt();
20 int d=sc.nextInt();
21 int e=sc.nextInt();
22 int count=0;
23 if(b==c)
24 {
25 if(d==e)
26 {
27 count=1;
28 }
29 }
30 else if(b==d)
31 {
32 if(c==e)
33 {
34 count=1;
35 }
36 }
37 else if(b==e)
38 {
39 if(c==d)
40 {
41 count=1;
42 }
43 }
44 if(count==0)
45 {
46 System.out.println("NO");
47
48 }
49 else
50 System.out.println("YES");
51
52 }
53 }
54}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected