Logo
(追記) (追記ここまで)

28008번 - LaLa and Monster Hunting (Part 1) 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
5 초 1024 MB51181229.268%

문제

A dreadful monster has been witnessed in a forest near the city of $\color{red}{\text{m}} \color{brown}{\text{a}} \color{orange}{\text{g}} \color{blue}{\text{i}} \color{magenta} {\text{c}}$ Sharia, and a group of valorous adventurers will hunt it down in few days before it hurts anyone. However, $\color{blue}{\text{LaLa}}$ knows that the real reason those adventurers are willing to take the risk is to obtain the rare $\color{red}{\text{m}} \color{brown}{\text{a}} \color{orange}{\text{g}} \color{blue}{\text{i}} \color{magenta} {\text{c}}$ stone that the monster is known to produce in its intestines. $\color{blue}{\text{LaLa}}$ would like to obtain the $\color{red}{\text{m}} \color{brown}{\text{a}} \color{orange}{\text{g}} \color{blue}{\text{i}} \color{magenta} {\text{c}}$ stone before they do, as it is known to be quite beautiful.

$\color{blue}{\text{LaLa}}$ will first locate the monster with her $\color{red}{\text{m}} \color{brown}{\text{a}} \color{orange}{\text{g}} \color{blue}{\text{i}} \color{magenta} {\text{c}}$. $\color{blue}{\text{LaLa}}$ has placed a bunch of $\color{red}{\text{m}} \color{brown}{\text{a}} \color{orange}{\text{g}} \color{blue}{\text{i}} \color{magenta} {\text{c}}$ tools within the forest, each of which has some power associated with it.

Consider the circles centered at each $\color{red}{\text{m}} \color{brown}{\text{a}} \color{orange}{\text{g}} \color{blue}{\text{i}} \color{magenta} {\text{c}}$ tool with radius equal to its power. $\color{blue}{\text{LaLa}}$'s $\color{red}{\text{m}} \color{brown}{\text{a}} \color{orange}{\text{g}} \color{blue}{\text{i}} \color{magenta} {\text{c}}$ will successfully locate the monster if and only if the convex hull of the circles contains the location of the monster.

Write a program that determines whether $\color{blue}{\text{LaLa}}$ will be able to locate the monster.

입력

The input is given in the following format:

$N$

$x_0$ $y_0$ $r_0$

$x_1$ $y_1$ $r_1$

$\vdots$

$x_{N-1}$ $y_{N-1}$ $r_{N-1}$

where $N$ is the number of $\color{red}{\text{m}} \color{brown}{\text{a}} \color{orange}{\text{g}} \color{blue}{\text{i}} \color{magenta} {\text{c}}$ tools placed in the forest, the $i$-th of which is located at $(x_i, y_i)$ and has power $r_i$. Here, assume that the forest is a two-dimensional plane where the monster is located at $(0, 0)$.

The input satisfies the following constraints:

  • All the numbers in the input are integers.
  • 1ドル \le N \le 1,000円,000円$
  • $-1,000円,000円 \le x_i, y_i \le 1,000円,000円$ for all integers 0ドル \le i < N$
  • 0ドル \le r_i \le 1,000円,000円$ for all integers 0ドル \le i < N$
  • The distance between point $(0, 0)$ and the boundary of the convex hull of $N$ circles, $i$-th of which is centered at $(x_i, y_i)$ and has radius $r_i,ドル is at least 1ドル$.

출력

If $\color{blue}{\text{LaLa}}$'s $\color{red}{\text{m}} \color{brown}{\text{a}} \color{orange}{\text{g}} \color{blue}{\text{i}} \color{magenta} {\text{c}}$ will successfully locate the monster, print a single string "Yes". Otherwise, print a single string "No". You may print each character in either case (lower or upper).

제한

예제 입력 1

3
-3 0 1
0 0 3
3 0 1

예제 출력 1

Yes

예제 입력 2

3
2 0 1
0 2 1
-5 -5 3

예제 출력 2

Yes

예제 입력 3

1
3 3 1

예제 출력 3

No

노트

The following illustrates the configuration of the $\color{red}{\text{m}} \color{brown}{\text{a}} \color{orange}{\text{g}} \color{blue}{\text{i}} \color{magenta} {\text{c}}$ tools for the sample tests. The red curve denotes the boundary of the convex hull.

First Sample Second Sample Third Sample

출처

Camp > Osijek Competitive Programming Camp > Winter 2023 > Day 9: Magical Story of LaLa E번

  • 문제를 만든 사람: aeren
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /