QOJ.ac

QOJ

Límite de tiempo: 1 s Límite de memoria: 2048 MB Puntuación total: 100

#7851. 幸存者

Estadísticas

在电脑游戏中,单位由其生命值 $h$、伤害值 $d$ 和装填时间 $t$ 来描述。

当一个单位向对方发射导弹时,对方的生命值会在导弹发射 $0.5$ 秒后减少 $d$。同一单位连续发射导弹的时间间隔至少应为 $t$ 秒。

为简化起见,我们假设游戏中所有单位的导弹供应都是无限的。

两名玩家——一名控制生命值为 $h_1$、伤害值为 $d_1$、装填时间为 $t_1$ 的单位,另一名控制生命值为 $h_2$、伤害值为 $d_2$、装填时间为 $t_2$ 的单位——在这款电脑游戏中展开了对决。两个单位在战斗开始时均已完全装填,可以立即发射导弹。

当单位的生命值降至零或负数时,该单位即被摧毁。如果存在一个时刻,对方的单位被摧毁而己方单位未被摧毁,则该玩家获胜。

由于导弹需要 $0.5$ 秒才能到达目标,因此两个单位有可能在同一时间发射导弹,并最终同时摧毁对方。

你需要确定在双方均采取最优策略的情况下,谁会获胜。

输入格式

  • 第一行包含整数 $h_1, d_1$ 和 $t_1$ ($1 \le h_1, d_1, t_1 \le 1000$)。
  • 第二行包含整数 $h_2, d_2$ 和 $t_2$ ($1 \le h_2, d_2, t_2 \le 1000$)。

输出格式

如果第一位玩家获胜,输出 player one;如果第二位玩家获胜,输出 player two;如果双方均未获胜,输出 draw

样例

样例输入 1

30 10 10
30 15 19

样例输出 1

player two

样例输入 2

30 15 19
30 10 10

样例输出 2

player one

样例输入 3

100 20 10
100 12 5

样例输出 3

draw

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.