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

31121번 - 2D Geometry 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB165426.667%

문제

There are $n$ distinct points on a 2-dimension plane. The coordinates of the $i$-th point is $(x_i, y_i)$.

If there are three points $A,ドル $B$ and $C$ which form a triangle $ABC$ 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 $n$.

For the following $n$ lines, the $i$-th line contains two integers $x_i$ and $y_i$.

출력

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

제한

  • 1ドル \leq n \leq 2 \times 10^5$
  • 0ドル \leq x_i, y_i \leq 10^9$ for each 1ドル \leq i \leq n$
  • $(x_i, y_i) \neq (x_j, y_j)$ for each 1ドル \leq i < j \leq n$
  • In each input, the sum of $n$ does not exceed 2ドル \times 10^5$.

예제 입력 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

예제 출력 1

3
0
0

노트

For the third test case, if Bobo chooses to remove the triangle $\{(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)\}$ first and then $\{(0, 2), (0, 3), (1, 2)\}$.

출처

Contest > Open Cup > 2020/2021 Season > Stage 18: Grand Prix of Beijing L번

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

출처

대학교 대회

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

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