QOJ.ac

QOJ

حد الوقت: 1.5 s حد الذاكرة: 256 MB مجموع النقاط: 100 قابلة للهجوم ✓

#15611. 考场

الإحصائيات

Busy Beaver 正在 MITIT 考场为他的学生们举办一场即将到来的考试。由于临时的准备和糟糕的测试,学生们需要走到他面前抱怨诸如糟糕的难度分布、服务器问题、误导性的题面以及差劲的背景故事等问题,同时又不能打扰到其他学生。因此,他需要确保选出的座位之间间隔足够远。

考场内有 $N$ 个座位,位置在点 $P_i = (x_i, y_i)$,而 Busy Beaver 的讲台位于 $O = (0, 0)$。他希望选择一个非空的座位子集,满足以下条件:

  • 子集中的每个座位到 Busy Beaver 讲台的距离,都严格小于它到子集中任何其他座位的距离。形式化地,对于子集中的所有点对 $P_i, P_j$ ($i \neq j$),均满足 $\text{dist}(P_i, P_j) > \text{dist}(O, P_i)$,其中 $\text{dist}$ 表示欧几里得距离。

有多少个非空子集满足这一标准?由于答案可能非常大,请将其对 $998\,244\,353$ 取模后输出。

输入格式

第一行包含一个整数 $N$ ($1 \le N \le 500$)。

接下来的 $N$ 行中,第 $i$ 行包含两个整数 $x_i$ 和 $y_i$ ($-10^9 \le x_i, y_i \le 10^9$)。

输入中的所有 $N$ 个点互不相同,且均不等于 $(0, 0)$。

输出格式

输出一个整数——满足条件的非空子集数量对 $998\,244\,353$ 取模后的结果。

子任务

本题共有四个子任务。

  • (10 分):$N$ 不超过 $15$。
  • (10 分):$N$ 不超过 $24$。
  • (10 分):$N$ 不超过 $80$。
  • (70 分):无附加限制。

样例

输入样例 1

2
1 2
2 1

输出样例 1

2

输入样例 2

3
1 2
2 1
1 -3

输出样例 2

5

说明

在第一个样例中,两个座位之间的距离为 $\sqrt{2}$,到原点的距离均为 $\sqrt{5}$。因此只能选择其中一个座位。

在第二个样例中,第三个座位到原点的距离为 $\sqrt{10}$,到最近的其他座位的距离为 $\sqrt{17}$,因此第三个座位总是可以被选择。合法的子集为:

$\{\text{座位 } 1\}, \{\text{座位 } 2\}, \{\text{座位 } 3\}, \{\text{座位 } 1, \text{座位 } 3\}, \{\text{座位 } 2, \text{座位 } 3\}$。

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.