Mission 1 - III : Run for Explodes
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
P1019 Mission 1 - III : Run for Explodes
Difficulty: \(\color{brown}420\)
Problem Background
Radar is finally in the Capital of the country, the City of UKE. When he goes in, he suddenly finds that the city has no one in it at all! And he knows that’s not good.
His phone rings…
- Hello, this is AOCode Army Centre. Our brave Radar, be careful now, we have detected that \(n\) explodes is flying to you there. BE CAREFUL!!!!!
Radar looks into the sky. There are hundreds of explodes flying to him from high high in the sky…
Problem Statement
There are \(n\) explodes flying to Radar. and because Radar is RADAR, he knows all locations of the explodes.
When one explode explodes, It will destroy everything in a square of \(\left\lfloor\dfrac{\rm perimetre}{8}\right\rfloor=k\) while it is the centre, and we know it could possibly Destroy Radar!
But Radar is not that easy to die. He has a explode destroyer, which can destroy explodes that centre is in the square of \(\left\lfloor\dfrac{\rm perimetre}{8}\right\rfloor=r\) while it’s centre is Radar.
So please figure out whether Radar could survive in the booming city.
Note that here we think the city of an square of Infinity area with an \(x-\rm axis\) and an \(y-\rm axis\).
Input
The \(1^{st}\) line contains \(3\) integers \(n\), \(r\), \(k\) in this order.
The \(2^{nd}\) line contain \(2\) integers, \(x_0\) and \(y_0\), which is the location of Radar.
Next \((n+1)\) lines, each line contains \(2\) integers \(x_i\) and \(y_i\) (\(1 \le i \le n\)), which is the location of the \(i^{\rm th}\) explode.
Output
Output \(1\) line which contains Yes
if Radar could survive, otherwise contains No
.
Samples
Input 1
5 8 3
5 5
5 4
4 5
5 6
6 5
8 7
Output 1
Yes
Input 2
5 3 8
5 5
5 4
4 5
5 6
6 5
9 7
Output 2
No
Constraints
- \(1 \le n \le 10^{5}\)
- \(1 \le r \le 200\)
- \(1 \le k \le 300\)
- \(1 \le x_i, y_i \le 1000\ (0 \le i \le n)\)
AOCode Round #2 (Div. 1) & AOSC #1 & GLOI Edu Round #1
- 状态
- 已结束
- 规则
- OI
- 题目
- 5
- 开始于
- 2021-10-05 12:00
- 结束于
- 2021-10-07 22:00
- 持续时间
- 58.0 小时
- 主持人
- 参赛人数
- 7