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

3297번 - POLYGON 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB159202027.027%

문제

There are N points in a plane whose coordinates are natural numbers. A convex polygon with maximal number of vertices is a convex polygon whose vertices are some of given points and the origin having maximal possible number of vertices. Origin, i.e. point with coordinates (0,0), must be one of vertices of a convex polygon with maximal number of vertices.

Write a program that will determine number of vertices in such polygon.

A polygon is convex if every line segment whose endpoints are inside that polygon is also completely inside it.

Consecutive edges of a polygon must not be parallel.

입력

The first line of input file contains a natural number N, 2 ≤ N ≤ 100, a number of given points.

Each of the following N lines contains two natural numbers X and Y, 1 ≤ X ≤ 100, 1 ≤ Y ≤ 100, separated by a space character, coordinates of one point. All points will be different.

출력

The first and only line of output file should contain number of vertices of convex polygon with maximal number of vertices.

Note: the result will always be at least 3.

제한

예제 입력 1

5
4 2
2 2
2 3
3 2
3 1

예제 출력 1

4

예제 입력 2

8
10 8
3 9
2 8
2 3
9 2
9 10
10 3
8 10

예제 출력 2

8

예제 입력 3

10
9 6
1 7
2 2
3 9
8 7
3 2
9 4
3 1
9 7
6 9

예제 출력 3

7

힌트

출처

Olympiad > Croatian Highschool Competitions in Informatics > 2001 > Croatian Olympiad in Informatics 2001 4번

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

출처

대학교 대회

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

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