CF372E.Drawing Circles is Fun

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

There are a set of points SS on the plane. This set doesn't contain the origin O(0,0)O(0,0) , and for each two distinct points in the set AA and BB , the triangle OABOAB has strictly positive area.

Consider a set of pairs of points (P1,P2),(P3,P4),...,(P2k1,P2k)(P_{1},P_{2}),(P_{3},P_{4}),...,(P_{2k-1},P_{2k}) . We'll call the set good if and only if:

  • k>=2k>=2 .
  • All PiP_{i} are distinct, and each PiP_{i} is an element of SS .
  • For any two pairs (P2i1,P2i)(P_{2i-1},P_{2i}) and (P2j1,P2j)(P_{2j-1},P_{2j}) , the circumcircles of triangles OP2i1P2j1OP_{2i-1}P_{2j-1} and OP2iP2jOP_{2i}P_{2j} have a single common point, and the circumcircle of triangles OP2i1P2jOP_{2i-1}P_{2j} and OP2iP2j1OP_{2i}P_{2j-1} have a single common point.

Calculate the number of good sets of pairs modulo 10000000071000000007 (109+7)(10^{9}+7) .

输入格式

The first line contains a single integer nn (1<=n<=1000)(1<=n<=1000) — the number of points in SS . Each of the next nn lines contains four integers ai,bi,ci,dia_{i},b_{i},c_{i},d_{i} (0<=ai,ci<=50; 1<=bi,di<=50; (ai,ci)(0,0))(0<=|a_{i}|,|c_{i}|<=50; 1<=b_{i},d_{i}<=50; (a_{i},c_{i})≠(0,0)) . These integers represent a point .

No two points coincide.

输出格式

Print a single integer — the answer to the problem modulo 10000000071000000007 (109+7)(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
    
首页