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

20765번 - Witch Dance 다국어

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

문제

Each Halloween, the $N$ witches of Sweden all gather high up in the air with their brooms to perform a magical dance. The dance consists of taking one's broom and rotating clockwise around one of the ends of the broom. Each broom is exactly 1ドル\text{ m}$ long, and everyone rotates at the same speed. The $i$'th witch originally starts rotated $r_i\text{ radians}$ clockwise. 0 radians means that the broom points to the right, i.e. positive $x$-direction. All the witches are located at the same height in the air, at positions $(x_i, y_i)$ for 1ドル \le i \le N$.

This dance is very beautiful, but has in recent years been plagued by a certain problem. It turns out that nobody had choreographed the dance properly. This caused some of the witches to crash into each other's brooms. As a result, their brooms would break and they would fall down helplessly, being forced to use their parachutes -- can you imagine a greater embarrassment for a witch?

This year, a coalition of witches are tired of their brooms breaking. They have thus produced a choreography beforehand, consisting of the original locations and rotations of the witches' brooms. Can you check if the dance will cause any brooms to crash into each other?

입력

The first line of input consists of a single integer $N$ (1ドル \le N \le 200,000円$), the number of witches. The next $N$ lines contains a description of each broom. Each line consists of the real numbers $x_i, y_i$ ($-10^{9} \le x_i \le y_i 10^{9}$), and the real number $r_i$ (0ドル \le r_i < 2\pi$), all with at most 20ドル$ digits after the decimal point. The coordinates are measured in meters, and give you the end of the broom that the broom rotates around.

The input will be such that the answer does not change even if the length of the brooms were 1ドル + 10^{-6}\text{ m}$ long.

출력

Output ok if no witches will crash into each other, and crash if at least one pair of witches will crash.

제한

예제 입력 1

2
0 0 0
0 1.5 0

예제 출력 1

ok

예제 입력 2

2
0 0 0
0 1.5 3.14159

예제 출력 2

crash

힌트

출처

Contest > Swedish Coding Cup > Sandvik Challenge 2020 E번

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

출처

대학교 대회

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

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