MCPcopy Create free account
hub / github.com/AdarshAddee/Hacktoberfest2022_for_Beginers / main

Method main

Java/CodeChef/q1.java:10–26  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

8class Codechef
9{
10public static void main (String[] args) throws java.lang.Exception
11{
12// your code goes here
13Scanner sc = new Scanner(System.in);
14int t=sc.nextInt();
15while(t-->0){
16 int x = sc.nextInt();
17 int y = sc.nextInt();
18 int p = sc.nextInt();
19 int q = sc.nextInt();
20 if(x==p && y==q)
21 System.out.println(0);
22 else if((x+y)%2==(p+q)%2)
23 System.out.println(2);
24 else System.out.println(1);
25}
26}
27}
28

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected