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

10640번 - Rings

시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 128 MB42171441.176%

문제

There are two circles with radius 1 in 3D space. Please check two circles are connected as chained rings.

입력

The input is formatted as follows.

pe

First line contains three real numbers(−3 ≤ cxi, cyi, czi ≤ 3). It shows a circle's center position. Second line contains six real numbers (−1 ≤ vxi,j ,vyi,j, vzi,j ≤1). A unit vector (vx1,1, vy1,1, vz1,1) is directed to the circumference of the circle from center of the circle. The other unit vector (vx1,2, vy1,2, vz1,2) is also directed to the circumference of the circle from center of the circle. These two vectors are orthogonalized. Third and fourth lines show the other circle information in the same way of first and second lines. There are no cases that two circles touch.

출력

If two circles are connected as chained rings, you should print "YES". The other case, you should print "NO". (quotes for clarity)

제한

예제 입력 1

0.0 0.0 0.0
1.0 0.0 0.0 0.0 1.0 0.0
1.0 0.0 0.5
1.0 0.0 0.0 0.0 0.0 1.0

예제 출력 1

YES

예제 입력 2

0.0 0.0 0.0
1.0 0.0 0.0 0.0 1.0 0.0
0.0 3.0 0.0
0.0 1.0 0.0 -1.0 0.0 0.0

예제 출력 2

NO

예제 입력 3

1.2 2.3 -0.5
1.0 0.0 0.0 0.0 1.0 0.0
1.1 2.3 -0.4
1.0 0.0 0.0 0.0 0.70710678 0.70710678

예제 출력 3

YES

예제 입력 4

1.2 2.3 -0.5
1.0 0.0 0.0 0.0 1.0 0.0
1.1 2.7 -0.1
1.0 0.0 0.0 0.0 0.70710678 0.70710678

예제 출력 4

NO

힌트

출처

Contest > ICPC Japanese Alumni Group > JAG Spring Contest > JAG Spring Contest 2013 H번

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

출처

대학교 대회

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

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