TopCoder

User's AC Ratio

100.0% (4/4)

Submission's AC Ratio

50.0% (6/12)

Tags

Description

給你兩個區間,範圍分別為 $[L_1,\ R_1]$ 與 $[L_2,\ R_2]$,
問你兩區間是否重疊?


對於所有測試資料:
$-10$$18$ $\le L_1 \le R_1 \le 10$$18$
$-10$$18$ $\le L_2 \le R_2 \le 10$$18$

Input Format

輸入共兩行,
第一行有兩個數字分別代表 $L_1,\ R_1$,
第二行有兩個數字分別代表 $L_2,\ R_2$。

Output Format

輸出 YesNo 代表兩區間是否重疊。

Sample Input 1

1 5
6 7

Sample Output 1

No

Sample Input 2

5 9
6 15

Sample Output 2

Yes

Sample Input 3

5 6
6 7

Sample Output 3

Yes

Hints

Problem Source

Subtasks

No. Testdata Range Constraints Score
1 0~24 題目範圍限制 100

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 65536 65536 1
1 1000 65536 65536 1
2 1000 65536 65536 1
3 1000 65536 65536 1
4 1000 65536 65536 1
5 1000 65536 65536 1
6 1000 65536 65536 1
7 1000 65536 65536 1
8 1000 65536 65536 1
9 1000 65536 65536 1
10 1000 65536 65536 1
11 1000 65536 65536 1
12 1000 65536 65536 1
13 1000 65536 65536 1
14 1000 65536 65536 1
15 1000 65536 65536 1
16 1000 65536 65536 1
17 1000 65536 65536 1
18 1000 65536 65536 1
19 1000 65536 65536 1
20 1000 65536 65536 1
21 1000 65536 65536 1
22 1000 65536 65536 1
23 1000 65536 65536 1
24 1000 65536 65536 1