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

19436번 - Eureka 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
5 초 64 MB72151229.268%

문제

Professor Zhang draws $n$ points on the plane which are conveniently labeled by 1,ドル 2, \ldots, n$. The $i$-th point is at $(x_i, y_i)$. Professor Zhang wants to know the number of best sets. As the value could be very large, print it modulo 10ドル^9 + 7$.

A set $P$ ($P$ contains the labels of the points) is called a best set if and only if there is at least one best pair in $P$. Two numbers $u$ and $v$ $(u, v \in P, u \ne v)$ are called a best pair if for every $w \in P,ドル $f(u, v) \ge g(u, v, w),ドル where $f(u, v) = \sqrt{(x_u - x_v)^2 + (y_u - y_v)^2}$ and $g(u, v, w) = \frac{f(u, v) + f(v, w) + f(w, u)}{2}$.

입력

There are multiple test cases. The first line of input contains an integer $T$ indicating the number of test cases. For each test case:

The first line contains an integer $n$ $(1 \le n \le 1000)$: the number of points.

Each of the following $n$ lines contains two integers $x_i$ and $y_i$ $(-10^9 \le x_i, y_i \le 10^9)$: coordinates of the $i$-th point.

There are no more than 250ドル$ test cases, and the sum of $n$ in all the test cases is at most 40ドル,000円$.

출력

For each test case, output a single integer: the number of best sets modulo 10ドル^9 + 7$.

제한

예제 입력 1

3
3
1 1
1 1
1 1
3
0 0
0 1
1 0
1
0 0

예제 출력 1

4
3
0

힌트

출처

Camp > Petrozavodsk Programming Camp > Summer 2016 > Day 1: Zheijang U Contest 2 E번

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

출처

대학교 대회

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

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