301964: CF372E. Drawing Circles is Fun

Memory Limit:256 MB Time Limit:3 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Drawing Circles is Fun

题意翻译

平面内$n$个点,其中任意两点所在的直线上都不包含原点$O$。 求一种集合的个数:$(P_1,P_2)(P_3,P_4)...(P_{2k-1},P_{2k})$使得: 1. 不存在 $i \neq j$,$P_i=P_j$. 2. 对于任意 $i\neq j$,$(P_{2i-1},P_{2i})(P_{2j-1},P_{2j})$满足,圆$OP_{2i-1}P_{2j-1}$和圆$OP_{2i}P_{2j}$只有一个交点,圆$OP_{2i-1}P_{2j}$和圆$OP_{2i}P_{2j-1}$只有一个交点。

题目描述

There are a set of points $ S $ on the plane. This set doesn't contain the origin $ O(0,0) $ , and for each two distinct points in the set $ A $ and $ B $ , the triangle $ OAB $ has strictly positive area. Consider a set of pairs of points $ (P_{1},P_{2}),(P_{3},P_{4}),...,(P_{2k-1},P_{2k}) $ . We'll call the set good if and only if: - $ k>=2 $ . - All $ P_{i} $ are distinct, and each $ P_{i} $ is an element of $ S $ . - For any two pairs $ (P_{2i-1},P_{2i}) $ and $ (P_{2j-1},P_{2j}) $ , the circumcircles of triangles $ OP_{2i-1}P_{2j-1} $ and $ OP_{2i}P_{2j} $ have a single common point, and the circumcircle of triangles $ OP_{2i-1}P_{2j} $ and $ OP_{2i}P_{2j-1} $ have a single common point. Calculate the number of good sets of pairs modulo $ 1000000007 $ $ (10^{9}+7) $ .

输入输出格式

输入格式


The first line contains a single integer $ n $ $ (1<=n<=1000) $ — the number of points in $ S $ . Each of the next $ n $ lines contains four integers $ a_{i},b_{i},c_{i},d_{i} $ $ (0<=|a_{i}|,|c_{i}|<=50; 1<=b_{i},d_{i}<=50; (a_{i},c_{i})≠(0,0)) $ . These integers represent a point ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF372E/617f303adacabe28ace76ac72aefdf3264b1fbfa.png). No two points coincide.

输出格式


Print a single integer — the answer to the problem modulo $ 1000000007 $ $ (10^{9}+7) $ .

输入输出样例

输入样例 #1

10
-46 46 0 36
0 20 -24 48
-50 50 -49 49
-20 50 8 40
-15 30 14 28
4 10 -4 5
6 15 8 10
-20 50 -3 15
4 34 -16 34
16 34 2 17

输出样例 #1

2

输入样例 #2

10
30 30 -26 26
0 15 -36 36
-28 28 -34 34
10 10 0 4
-8 20 40 50
9 45 12 30
6 15 7 35
36 45 -8 20
-16 34 -4 34
4 34 8 17

输出样例 #2

4

输入样例 #3

10
0 20 38 38
-30 30 -13 13
-11 11 16 16
30 30 0 37
6 30 -4 10
6 15 12 15
-4 5 -10 25
-16 20 4 10
8 17 -2 17
16 34 2 17

输出样例 #3

10

Input

题意翻译

平面内$n$个点,其中任意两点所在的直线上都不包含原点$O$。 求一种集合的个数:$(P_1,P_2)(P_3,P_4)...(P_{2k-1},P_{2k})$使得: 1. 不存在 $i \neq j$,$P_i=P_j$. 2. 对于任意 $i\neq j$,$(P_{2i-1},P_{2i})(P_{2j-1},P_{2j})$满足,圆$OP_{2i-1}P_{2j-1}$和圆$OP_{2i}P_{2j}$只有一个交点,圆$OP_{2i-1}P_{2j}$和圆$OP_{2i}P_{2j-1}$只有一个交点。

加入题单

上一题 下一题 算法标签: