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

26410번 - Intersection Of Tangents 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 (추가 시간 없음) 1024 MB60353265.306%

문제

In this problem polygons are assumed to have no self-touchings or self-intersections.

A tangent to a polygon is a straight line that contains at least one point on the boundary of the polygon, and none of its interior points.

You are given a polygon with integer vertex coordinates. The polygon is not necessarily convex. Find a point with integer coordinates such that there exist two tangents to this polygon which both pass through this point and intersect at 90$^{\circ}$. It is guaranteed that at least one solution exists. If there are multiple solutions, output any of them.

입력

The first line of input contains a single integer $n$ (3ドル \leq n \leq 1000$) --- the number of vertices in the polygon.

$n$ lines follow describing the vertices of the polygon. $i$-th of them contains two integers $x_i$ and $y_i$ ($-10^8 \leq x_i, y_i \leq 10^8$) --- the coordinates of $i$-th vertex. The vertices are given in counter-clockwise order.

The polygon has no self-touchings or self-intersections. There are no three consecutive points which lie on the same line.

It is guaranteed that an answer exists.

출력

Output two integers $x$ and $y$ ($-10^9 \leq x, y \leq 10^9$) --- the coordinates of the point you found.

제한

예제 입력 1

3
1 2
3 1
3 3

예제 출력 1

1 2

예제 입력 2

4
0 0
7 1
2 1
3 2

예제 출력 2

1 3

힌트

Images for samples and some random photo.

출처

Camp > Moscow Pre-Finals ACM ICPC Workshop > Moscow Pre-Finals ACM ICPC Workshop 2018 I번

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

출처

대학교 대회

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

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