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

8057번 - Empty Cuboids 다국어

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

문제

We call a cuboid regular if:

  • one of its vertices is a point with coordinates (0,0,0),
  • edges beginning in this vertex lay on positive semi-axes of the coordinate system,
  • the edges are not longer than 106.

There is given a set A of points of space, which coordinates are integers from the interval [1,10^6]. We try to find a regular cuboid of maximal volume, which does not contain any of the points from the set A. A point belongs to the cuboid if it belongs to the inside of the cuboid, i.e. it is a point of the cuboid, but not of its wall.

Write a program which:

  • reads from the standard input coordinates of points from the set A,
  • finds one of the regular cuboids of maximal volume, which does not contain any points from the set A,
  • writes the result to the standard output.

입력

In the first line of the standard input one non-negative integer n, n ≤ 5,000, is written. It is the number of elements in the set A. In the following n lines of the input there are triples of integers from the interval [1,106], which are coordinates (respectively x, y and z) of points from A. Numbers in each line are separated by single spaces.

출력

In the only line of the standard output there should be three integers separated by single spaces. These are coordinates (respectively x, y and z) of the vertex of the regular cuboid of maximal volume. We require that coordinates are positive.

제한

예제 입력 1

4
3 3 300000
2 200000 5
90000 3 2000
2 2 1000

예제 출력 1

1000000 200000 1000

힌트

출처

Olympiad > Polish Olympiad in Informatics > POI 1998/1999 > Stage 1 4번

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

출처

대학교 대회

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

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