QOJ.ac

QOJ

حد الوقت: 1.0 s حد الذاكرة: 2048 MB مجموع النقاط: 100

#15672. 反导弹

الإحصائيات

我们希望对敌方的关键资源实施一次战略导弹打击。敌方部署了防空系统来保护这些资源。然而,他们的防空部署存在某些漏洞,你的任务是有效地利用这些漏洞。

每个防空系统可以保护其运行半径内的所有战略资源和防空系统,但不能保护自身。由于技术限制,每个关键资源或防空系统最多被另一个防空系统保护。

导弹可用于摧毁未受保护的战略资源或防空系统。

如果没有处于激活状态的防空系统保护某个资源,则该资源被视为未受保护。当一个防空系统被摧毁时,它不能再保护任何资源或其他防空系统。你的目标是最大化被摧毁的战略资源数量。

输入格式

输入包含以下内容:

第一行包含三个整数 $m$(导弹数量)、$n$(战略资源数量)和 $d$(防空系统数量),其中($0 \le m, n, d \le 5\,000$)。

接下来的 $n$ 行,每行包含两个整数 $x_i$ 和 $y_i$($0 \le x_i, y_i \le 10^9$),表示第 $i$ 个战略资源的坐标。

接下来的 $d$ 行,每行包含三个整数 $x_j$、$y_j$ 和 $r_j$($0 \le x_j, y_j \le 10^9$;$0 \le r_j \le 10^9$),表示第 $j$ 个防空系统的坐标及其防护半径。

输出格式

输出可以被摧毁的战略资源的最大数量。

样例

输入样例 1

3 4 3
0 0
10 20
20 20
30 30
5 5 9
16 16 14
25 25 5

输出样例 1

2

说明

样例测试用例如下图所示:

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.