CF372E.Drawing Circles is Fun

NOI/NOI+/CTSC

通过率:0%

时间限制:3.00s

内存限制:256MB

AC君温馨提醒

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

题目描述

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_2_k - 1, P_2_k). 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_2_i - 1, P_2_i) and (P_2_j - 1, P_2_j), the circumcircles of triangles OP_2_i - 1_P_2_j_ - 1 and OP_2_i__P_2_j have a single common point, and the circumcircle of triangles OP_2_i - 1_P_2_j_ and OP_2_i__P_2_j - 1 have a single common point.

Calculate the number of good sets of pairs modulo 1000000007 (109 + 7).

平面上有一组点集 SS。该点集不包含原点 O(0, 0)O(0,\,0),且对其中任意两个不同的点 AA 和 BB,三角形 OABOAB 的面积严格大于 0。

考虑一组点对:(P1, P2), (P3, P4), …, (P2k−1, P2k)(P_1,\,P_2),\,(P_3,\,P_4),\,\dots,\,(P_{2k-1},\,P_{2k})。我们称该点对集合为“好”的,当且仅当满足以下条件:

  • k≥2k \geq 2;
  • 所有 PiP_i 互不相同,且每个 PiP_i 均属于 SS;
  • 对任意两对 (P2i−1, P2i)(P_{2i-1},\,P_{2i}) 和 (P2j−1, P2j)(P_{2j-1},\,P_{2j})(其中 i≠ji \ne j),三角形 OP2i−1P2j−1OP_{2i-1}P_{2j-1} 与 OP2iP2jOP_{2i}P_{2j} 的外接圆恰有一个公共点,且三角形 OP2i−1P2jOP_{2i-1}P_{2j} 与 OP2iP2j−1OP_{2i}P_{2j-1} 的外接圆也恰有一个公共点。

请计算“好”的点对集合的个数,结果对 10000000071000000007(即 109+710^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 .

No two points coincide.

第一行包含一个整数 nn(1≤n≤10001 \leq n \leq 1000)——集合 SS 中点的个数。接下来的 nn 行每行包含四个整数 ai, bi, ci, dia_i,\,b_i,\,c_i,\,d_i(0≤∣ai∣, ∣ci∣≤500 \leq |a_i|,\,|c_i| \leq 50;1≤bi, di≤501 \leq b_i,\,d_i \leq 50;(ai, ci)≠(0, 0)(a_i,\,c_i) \neq (0,\,0))。这些整数表示一个点 。

任意两个点均不重合。

输出格式

Print a single integer — the answer to the problem modulo 1000000007 (109 + 7).

输出一个整数——该问题答案对 10000000071000000007(即 109+710^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

输入解题思路,AI测评打分。不知道怎么写?

首页