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

15302번 - Triangle to Hexagon 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB421211100.000%

문제

Given a triangle ABC with incenter (center of its inscribed circle), I, and circumscribed circle O, let M, N and P be the second points of intersection of the lines through A and I, B and I resp. C and I with the circle O.

Let E and F be the intersections of the line NP with AB and AC respectively. Similarly, let G and H be the intersections of the line MN with AC and BC respectively and let J and K be the intersections of the line MP with BC and AB respectively.

Write a program which takes as input the coordinates of the vertices A, B and C of the triangle and outputs the lengths of the segments EF, FG, GH, HJ, JK and KE. Supposedly,

|EF| + |GH| + |JK| <= |KE| + |FG| + |HJ|.

Computations should be done in double precision floating point.

입력

The first line of input contains a single integer P, (1 ≤ P ≤ 10000), which is the number of data sets that follow. Each data set should be processed identically and independently.

Each data set consists of one line of input. The line contains the data set number, K, followed by three floating point values: the x coordinate of B, Bx, the x coordinate of C, Cx and the y coordinate of C, Cy. A will always be the origin (0,0) and B will always be on the x-axis so By = 0.

출력

For each data set there is a single line of output. The single output line consists of the data set number, K followed by the 6 decimal values to 4 decimal places separated by spaces. The values are the lengths of EF, FG, GH, HJ, JK and KE in that order.

제한

예제 입력 1

3
1 3 2.5 3
2 3 2 3
3 3 4 3

예제 출력 1

1 0.9992 1.5332 0.9954 0.9300 1.1859 0.9048
2 1.0450 1.3309 1.0257 1.0238 1.1358 0.9214
3 0.8499 2.2397 0.8447 0.8959 1.3790 0.8063

힌트

출처

ICPC > Regionals > North America > Greater New York Region > 2017 Greater New York Programming Contest H번

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

출처

대학교 대회

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

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