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

25357번 - Connect the Points 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 512 MB129464440.367%

문제

You are given three points on a plane. You should choose some segments on the plane that are parallel to coordinate axes, so that all three points become connected. The total length of the chosen segments should be the minimal possible.

Two points $a$ and $b$ are considered connected if there is a sequence of points $p_0 = a, p_1, \ldots, p_k = b$ such that points $p_i$ and $p_{i+1}$ lie on the same segment.

입력

The input consists of three lines describing three points. Each line contains two integers $x$ and $y$ separated by a space --- the coordinates of the point ($-10^9 \le x, y \le 10^9$). The points are pairwise distinct.

출력

On the first line output $n$ --- the number of segments, at most 100.

The next $n$ lines should contain descriptions of segments. Output four integers $x_1,ドル $y_1,ドル $x_2,ドル $y_2$ on a line --- the coordinates of the endpoints of the corresponding segment ($-10^9 \le x_1, y_1, x_2, y_2 \le 10^9$). Each segment should be either horizontal or vertical.

It is guaranteed that the solution with the given constraints exists.

제한

예제 입력 1

1 1
3 5
8 6

예제 출력 1

3
1 1 1 5
1 5 8 5
8 5 8 6

노트

The points and the segments from the example are shown below.

출처

ICPC > Regionals > Northern Eurasia > Northern Eurasia Finals > Northern Eurasia Finals 2021 C번

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

출처

대학교 대회

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

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