QOJ.ac

QOJ

Límite de tiempo: 10 s Límite de memoria: 1024 MB Puntuación total: 100

#11236. 天降正义

Estadísticas

如果你玩过《守望先锋》(Overwatch),你可能知道英雄“法老之鹰”(Pharah),这是一位能够飞行的进攻型英雄。

法老之鹰拥有一个强大的终极技能,名为“火箭弹幕”(Barrage),它是游戏中破坏力最强的技能之一。施放该技能时,法老之鹰会引导一连串的微型火箭来摧毁敌方群体。

让我们看看它是如何运作的。游戏地图可以被视为一个三维空间,所有玩家都是空间中的点。对于“火箭弹幕”,火箭覆盖的区域包含所有满足以下条件的点:该点指向法老之鹰的方向与法老之鹰准星方向之间的夹角不超过 $\alpha$。在技能激活期间,法老之鹰必须保持静止,其准星方向也必须保持不变。

现在你来到了努巴尼(Numbani)地图,并选择了法老之鹰作为你的英雄。地面上(即 $z = 0$)有 $N$ 个位置各不相同的敌人。通过使用法老之鹰的技能“跳跃喷气”(Jump Jet),你已经飞到了一个有利位置(即 $z > 0$),并且终极技能已经就绪。如果你想打出“全场最佳”(Play of the Game),你必须尽可能多地消灭敌人。

现在出现了一个“简单几何”问题:如果你选择了最佳的准星方向,使用终极技能最多能消灭多少名敌人?

输入格式

输入的第一行包含测试用例的数量 $T$。接下来是 $T$ 个测试用例。

每个测试用例的第一行包含两个整数 $N$ 和 $\alpha$,分别表示敌人的数量和“火箭弹幕”的夹角范围。

下一行包含三个整数 $x, y$ 和 $z$,表示法老之鹰的位置坐标。

接下来的 $N$ 行,每行包含两个整数 $x, y$,表示每个敌人在地面上的坐标。

输出格式

对于每个测试用例,输出一行 “Case #x: y”,其中 $x$ 是测试用例编号(从 1 开始),$y$ 是通过施放“火箭弹幕”所能消灭的最多敌人数量。

数据范围

  • $1 \le T \le 100$
  • $1 \le N \le 1000$
  • $0 < \alpha < 90$
  • $|x|, |y| \le 1000$
  • $0 < z \le 1000$
  • 对于 90% 的测试用例,$N \le 6$。

样例

输入 1

2
2 45
0 0 3
1 -2
-5 2
4 89
1 1 1
30 0
0 50
-70 0
0 -90

输出 1

Case #1: 2
Case #2: 3

Figure 1. 法老之鹰使用“火箭弹幕”技能

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.