Split Game
시간 제한1초메모리 제한512 MB
제1사분면에 있는 단순 다각형의 꼭짓점이 반시계 방향으로 주어질 때, 원점을 지나는 한 직선이 다각형을 나눌 수 있는 0이 아닌 넓이 영역의 최대 개수를 구한다.
문제
Consider the following game about splitting a simple polygon with vertices on a plane. The purpose of this game is using a straight line which passes through the origin to split the given simple polygon into as many non-zero area regions as possible. Please finish the game with the best result possible.
입력
The input consists of lines. The first line contains an integer . The -th of the following lines consists of two integers and indicating the vertices of the given polygon in counter-clockwise order.
출력
Output one integer: the maximum number of non-zero area regions into which the given polygon can be split by a single line passing through the origin.
제한
- if , then
- the vertices are given in counter-clockwise order
힌트
