logo AlgoBeat OnlineJudge
登录 注册

#214809. [ICPC 2024 Tehran R] Anti-Missile

内存限制:2048 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

We want to execute a strategic missile strike against an enemy's critical resources. The enemy has deployed air defence systems to protect these resources. However, their defence setup has certain vulnerabilities, and your mission is to exploit them effectively.

Each air defence system can protect all strategic resources and air defence systems within its radius of operation, but cannot defend itself. Due to technical limitations, each critical resource or air defence system is protected by at most one other air defence system.

Missiles can be used to destroy either an undefended strategic resource or an air defence system.

A resource is considered undefended if no active air defence system protects it. When an air defence system is destroyed, it can no longer protect any resources or other air defence systems. Your goal is to maximize the number of strategic resources destroyed.

输入格式

The input consists of the following:

The first line contains three integers (number of missiles), (number of strategic resources), and (number of air defence systems), where ().

The next lines contain two integers and () the coordinates of the strategic resource.

The following lines each contain three integers , and (; ) the coordinates of the air defence system and its radius of protection.

输出格式

Output the maximum number of strategic resources that can be destroyed.

样例

样例输入 1

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

样例输出 1

2

数据范围与提示

The example test case is depicted by the figure below:

:::align{center} :::