#536
Unrated
Permutation
시간 제한
2s
메모리 제한
1024MB
제출
0
정답
0
맞힌 사람
0
정답 비율
0.0%

문제

Bessie has NN (3N403\le N\le 40) favorite distinct points on a 2D grid, no three of which are collinear. For each 1iN1\le i\le N, the ii-th point is denoted by two integers xix_i and yiy_i (0xi,yi1040\le x_i,y_i\le 10^4).

Bessie draws some segments between the points as follows.

She chooses some permutation p1,p2,,pNp_1,p_2,\ldots,p_N of the NN points.She draws segments between p1p_1 and p2p_2, p2p_2 and p3p_3, and p3p_3 and p1p_1.Then for each integer ii from 44 to NN in order, she draws a line segment from pip_i to pjp_j for all j<ij<i such that the segment does not intersect any previously drawn segments (aside from at endpoints).

Bessie notices that for each ii, she drew exactly three new segments. Compute the number of permutations Bessie could have chosen on step 1 that would satisfy this property, modulo 109+710^9+7.

입력

The first line contains NN.

Followed by NN lines, each containing two space-separated integers xix_i and yiy_i.

출력

The number of permutations modulo 109+710^9+7.

예제 입력 1

4
0 0
0 4
1 1
1 2

예제 출력 1

0

예제 입력 2

4
0 0
0 4
4 0
1 1

예제 출력 2

24

예제 입력 3

5
0 0
0 4
4 0
1 1
1 2

예제 출력 3

96

점수

Test cases 1-6 satisfy N8N\le 8.Test cases 7-20 satisfy no additional constraints.

코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
아직 맞은 사람이 없습니다.
난이도 투표
Unrated0명 투표
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
제출 내역이 없습니다.