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

26104번 - Empty Quadrilaterals 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB203796238.272%

문제

A quadrilateral is a polygon with exactly four distinct corners and four distinct sides, without any crossing between its sides. In this problem, you are given a set $P$ of $n$ points in the plane, no three of which are collinear, and asked to count the number of all quadrilaterals whose corners are members of the set $P$ and whose interior contains no other points in $P$.

For example, assume that $P$ consists of five points as shown in the left of the figure above. There are nine distinct quadrilaterals in total whose corners are members of $P,ドル while only one of them contains a point of $P$ in its interior, as in the right of the figure above. Therefore, there are exactly eight quadrilaterals satisfying the condition and your program must print out 8ドル$ as the correct answer.

입력

Your program is to read from standard input. The input starts with a line containing an integer $n$ (1ドル ≤ n ≤ 300$), where $n$ denotes the number of points in the set $P$. In the following $n$ lines, each line consists of two integers, ranging from $-10^9$ to 10ドル^9,ドル representing the coordinates of a point in $P$. There are no three points in $P$ that are collinear.

출력

Your program is to write to standard output. Print exactly one line consisting of a single integer that represents the number of quadrilaterals whose corners are members of the set $P$ and whose interior contains no other points in $P$.

제한

예제 입력 1

5
0 0
2 4
6 2
6 -2
7 3

예제 출력 1

8

예제 입력 2

4
0 0
10 0
5 10
3 2

예제 출력 2

3

예제 입력 3

10
10 10
1 0
4 8
-1 -4
-7 -4
-3 2
5 -10
-10 -5
1 1
5 -3

예제 출력 3

170

힌트

출처

ICPC > Regionals > Asia Pacific > Korea > Asia Regional - Seoul 2022 C번

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

출처

대학교 대회

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

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