| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 25 | 20 | 17 | 77.273% |
A frog is located at the coordinate (x1,y1). He wants to go to the coordinate (x2,y2). He will perform one or more jumps to reach his destination. The rule of the jumping is as follows: Suppose the frog is located at the coordinate (x,y); then he can jump to the following four squares:
Given the coordinates (x1,y1) and (x2,y2), you need to determine if it is possible for the frog to travel from (x1,y1) to (x2,y2) through a series of jumps as described.
The first input line contains an integer, n (1 ≤ n ≤ 100), indicating the number of test cases. Each test case consists of four integers (between -1,000,000,000 to +1,000,000,000 inclusive) separated by a single space denoting x1, y1, x2 and y2, respectively.
For each test case, output 1 if the frog can travel from (x1,y1) to (x2,y2) through a series of jumps as described or 0 otherwise.
3 -6 8 17 25 13 17 -16 11 0 0 5 6
0 1 0