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

3555번 - Four Points 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 256 MB284414.815%

문제

Mike is a magician. One of his inventions is a labyrinth that gives supernatural abilities to every person who walks through it. The labyrinth has an extremely complicated internal structure, however, for an external observer it is just a square on the ground.

Mike has found some suitable place for labyrinth on the seashore. He drew its border on the sand and marked four points with small stones so that each side of the square contained exactly one stone and no stone was placed in the corner.

As no picture drawn on the sand stays forever, after a while Mike found only the stones on their places. Now he wonders where the marked square could have been.

Your task is to restore some possible place of the labyrinth and return four corners of the square as a result. You may assume that the seashore is a plane and the stones are points on it.

입력

The first four lines of the input file contain two integer numbers $x_i$ and $y_i$ each --- coordinates of the $i$-th point ($-1,000円 \le x_i, y_i \le 1,000円$). No two points coincide, no three points are collinear.

출력

Output four lines containing two real numbers each --- coordinates of the vertices of the square. Vertices should be listed in either clockwise or counterclockwise order. Coordinates must be precise up to 6 digits after the decimal point.

If there are multiple solutions, output any of them. If there is no solution, write four pairs of zeroes instead of the coordinates.

제한

예제 입력 1

6 13
11 12
9 2
2 6

예제 출력 1

6 0
15 6
9 15
0 9

예제 입력 2

0 0
5 5
5 0
3 2

예제 출력 2

0 0
0 0
0 0
0 0

힌트

출처

ICPC > Regionals > Northern Eurasia > Northwestern Russia Regional Contest > NEERC Northern Subregional 2009 F번

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

출처

대학교 대회

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

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