EPIC Institute of Technology Round August 2024 (Div. 1 + Div. 2)
C
Black Circles
Codeforces
1200
原题
← BD1 →
翻译中…

There are $n$ circles on a two-dimensional plane. The $i$-th circle is centered at $(x_i,y_i)$. Initially, all circles have a radius of $0$.

翻译中…

The circles' radii increase at a rate of $1$ unit per second.

翻译中…

You are currently at $(x_s,y_s)$; your goal is to reach $(x_t,y_t)$ without touching the circumference of any circle (including the moment you reach $(x_t,y_t)$). You can move in any direction you want. However, your speed is limited to $1$ unit per second.

翻译中…

Please determine whether this is possible.

翻译中…

Input

翻译中…

Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1\le t\le10^4$). The description of the test cases follows.

翻译中…

The first line of each test case contains a single integer $n$ ($1\le n\le10^5$) — the number of circles.

翻译中…

The next $n$ lines each contain two integers $x_i$, $y_i$ ($1\le x_i,y_i\le10^9$) — the center of each circle.

翻译中…

The final line contains four integers $x_s$, $y_s$, $x_t$, $y_t$ ($1\le x_s,y_s,x_t,y_t\le10^9$) — the coordinates of the starting point and the goal, respectively.

翻译中…

It is guaranteed that these $n+2$ points are distinct.

翻译中…

It is guaranteed that the sum of $n$ over all testcases does not exceed $10^5$.

翻译中…

Output

翻译中…

For each test case, output $\texttt{YES}$ if it is possible to reach the goal without touching the circle boundaries, and output $\texttt{NO}$ otherwise.

翻译中…

You can output $\texttt{Yes}$ and $\texttt{No}$ in any case (for example, strings $\texttt{yEs}$, $\texttt{yes}$, $\texttt{Yes}$, and $\texttt{YES}$ will be recognized as a positive response).

翻译中…

Note

翻译中…

In the first test case, a feasible way of movement is as follows.

翻译中…

image

翻译中…

样例

Input #1
7
3
2 5
2 14
10 13
4 9 9 7
3
10 11
6 9
12 12
14 13 4 8
1
5 7
12 6 11 13
2
1000000000 2
2 1000000000
1 1 2 2
1
999999998 1000000000
999999999 999999999 1 1
1
1000000000 1
1 1000000000 1 1
10
989237121 2397081
206669655 527238537
522705783 380636165
532545346 320061691
207818728 199485303
884520552 315781807
992311437 802563521
205138355 324818663
223575704 395073023
281560523 236279118
216941610 572010615 323956540 794523071
Output #1
YES
NO
YES
YES
YES
NO
YES
InputCopy OutputCopy
题目信息
题号
2002C
时间限制
2 s
内存限制
256 MB
标签
暴力
计算几何
贪心
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。