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

11529번 - Brocard Point of a Triangle 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB32202062.500%

문제

The Brocard point of a triangle ABC is a point P in the triangle chosen so that: ∠PAB = ∠PBC = ∠PCA (see figure below).

The common angle is called the Brocard angle. The largest Brocard angle is π/6 which is the Brocard angle for an equilateral triangle (the Brocard point is the centroid of the triangle).

Write a program to compute the coordinates of the Brocard point of a triangle given the coordinates of the vertices.

입력

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 a single line of input. It contains the data set number, K, followed by the six space separated coordinate values Ax, Ay, Bx, By, Cx, Cy of the vertices of the triangle. The vertices will always be specified so going from A to B to C and back to A circles the triangle counter-clockwise. Input coordinates are floating point values.

출력

For each data set there is a single line of output. The single output line consists of the data set number, K, followed by a single space followed by the x coordinate of the Brocard point, followed by a single space followed by the y coordinate of the Brocard point. Coordinates should be rounded to five decimal places.

제한

예제 입력 1

3
1 0 -1.3 3.4 0.5 1.1 2.3
2 0 0 3 0 0 4
3 3.1 0.2 4.3 0.4 0 0.8

예제 출력 1

1 1.40456 0.82890
2 1.56047 0.74902
3 3.87699 0.40167

힌트

출처

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

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

출처

대학교 대회

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

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