Dues reines


Submit solution

Points: 10
Time limit: 5.0s
Memory limit: 256M

Author:
Problem types
Allowed languages
C#, Go, Java

Donades les posicions de les dues reines en un tauler d'escacs, digues si s'amenacen mútuament.

Input Format

La entrada consisteix en 4 nombres indicant les coordenades \(X\) i \(Y\) de cada reina.

Constraints

-

Output Format

true | false

Test Case 1

Input
4 4
4 6
Output
true
Explanation

Test Case 2

Input
3 5
7 5
Output
true
Explanation

Test Case 3

Input
2 2
5 3
Output
false
Explanation

Test Case 4

Input
3 3
5 5
Output
true
Explanation

Test Case 5

Input
5 5
3 3
Output
true
Explanation

Test Case 6

Input
2 6
5 3
Output
true
Explanation

Test Case 7

Input
5 3
2 6
Output
true
Explanation

Test Case 8

Input
1 2
7 8
Output
true
Explanation

Test Case 9

Input
7 8
1 2
Output
true
Explanation

Test Case 10

Input
4 8
7 3
Output
false
Explanation


Authorship: Gerard Falcó

CC BY-NC-SA 4.0