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

21224번 - Geometrija 서브태스크다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB40326.897%

문제

You are given n points on the plane, such that no three points lie on the same line.

We say that line segments AB and CD cross if they share a point X different from the points A, B, C and D.

Let S be the set of all line segments between pairs of the given points. Find the number of segments in S that don’t cross with any other segment in S.

입력

The first line contains an integer n (3 ≤ n ≤ 1000), the number of points.

The following n lines contain integers xi and yi (−109 ≤ xi, yi ≤ 109), the coordinates of the points.

출력

Output the requested number of segments.

제한

서브태스크

번호배점제한
120

3 ≤ n ≤ 40

230

3 ≤ n ≤ 200

360

No additional constraints.

예제 입력 1

4
1 1
-1 1
-1 -1
1 -1

예제 출력 1

4

예제 입력 2

4
-1 -1
1 -1
0 1
0 0

예제 출력 2

6

힌트

출처

Contest > Croatian Open Competition in Informatics > COCI 2020/2021 > Contest #6 4번

채점 및 기타 정보

  • 예제는 채점하지 않는다.
(追記) (追記ここまで)

출처

대학교 대회

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

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