아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

2D Geometry

시간 제한1초메모리 제한1024 MB

요약
서로 다른 n개의 점에서 넓이가 양수인 삼각형을 이루는 세 점을 반복해 지울 때 남길 수 있는 최소 점의 수를 구한다.
난이도

보통10점 중 6점

유형
기하, 그리디, 수학
정답자
아직 제출이 없습니다

문제

There are nn distinct points on a 2-dimension plane. The coordinates of the ii-th point is (x_i,y_i)(x\_i, y\_i).

If there are three points AA, BB and CC which form a triangle ABCABC with positive area, Bobo can remove them simultaneously from the plane. Also, if there are multiple triangles with positive area, Bobo can choose to remove any of them. Find the minimum number of points left on the plane if he can perform the operation for any number of times.

입력

The input consists of several test cases terminated by end-of-file. For each test case,

The first line contains an integer nn.

For the following nn lines, the ii-th line contains two integers x_ix\_i and y_iy\_i.

출력

For each test case, output an integer which denotes the minimum number of points left.

제한

  • 1≤n≤2×1051 \leq n \leq 2 \times 10^5
  • 0≤x_i,y_i≤1090 \leq x\_i, y\_i \leq 10^9 for each 1≤i≤n1 \leq i \leq n
  • (x_i,y_i)≠(x_j,y_j)(x\_i, y\_i) \neq (x\_j, y\_j) for each 1≤i<j≤n1 \leq i < j \leq n
  • In each input, the sum of nn does not exceed 2×1052 \times 10^5.

힌트

For the third test case, if Bobo chooses to remove the triangle (0,1),(1,1),(1,2)\\{(0, 1), (1, 1), (1, 2)\\} first, there will be no other triangles to remove. Alternatively, Bobo can remove the triangle (0,0),(0,1),(1,1)\\{(0, 0), (0, 1), (1, 1)\\} first and then (0,2),(0,3),(1,2)\\{(0, 2), (0, 3), (1, 2)\\}.

예제1

  1. 예제 1

    입력
    3
    0 0
    0 1
    0 2
    3
    0 0
    0 1
    1 0
    6
    0 0
    0 1
    0 2
    0 3
    1 1
    1 2
    
    예상 출력
    3
    0
    0