当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3582:Last Hit

题目描述

GtDzx has felt in love with a game called DotA (Defense of the Ancient) recently. The purpose of the game, just similar as the other games, is to gain money by killing and finally, destroy your opponents' buildings. And same as other games, money is very important in DotA too. There are two ways of earning in the game: killing creeps and killing your opponents. However, it's very hard for you to kill your opponents in the beginning of the game for your can only afford low level items when the game started, so for most heroes, earning on the lane is their best choice. Although the strategy is clear, the results are not the same for everyone. After 10 minutes of getting no money from the creeps, GtDzx finally got raged and shouted: "It's unfair! This hero's attack is too low so that it's entirely impossible for me to get the money of even one creep!" To prove his conclusion, he asks you to write a program to simulate the progress of killing creep and tell him what the result will be while both sides using the optimistic strategies.

To simplify the game, we just consider the situation including only two heroes and one creep, as showed in the image above. At the beginning, the creep has M health point(HP), and its HP will keep dropping as time goes by. (The reason? Maybe plague, cough, fracture or some other diseases, who knows?) The dropping rate is constant, as d HP per second. And there are two heroes waiting to kill the creep. For Hero_i, he can give an immediately damage of Attack_i to the creep by each of his bullet when it reaches the creep. However, it’s impossible for a hero shoot too fast because it will take Time_i seconds for Hero_i's bullet reaches the creep and a hero cannot fire until his last bullet reaches the creep. And both players' goal is the same: get the "last hit" of the creep, which means that the hit that reduces the HP of the creep from positive to non-positive. After given the data mentioned above, your goal is to determine which hero will get the last hit of the creep under optimistic strategies and your program may give GtDzx a chance to find some excuses about his poor last-hitting skill.

Tips:

  1. If a bullet arrives as soon as the hp of the creep reaches 0, the creep is considered killed by the bullet.
  2. If two bullets arrives at the same time and the total damage of them reduces the hp of the creep from positive to non-positive, the creep is considered killed by the first hero (Player1).
输入解释

There are several test cases for this problem.
For each case, the first number is an integer M, refer to the HP of the creep.
The second number is a positive integer, d, refer to the HP dropping rate of the creep.
Then follows four integers, refer to Attack_1, Time_1, Attack_2, and Time_2

All numbers are less than 10000.

输出解释


If Hero_1 can surely get the last hit of the creep, output "Player1".
If Hero_2 can surely get the last hit of the creep, output "Player2".
If the creep will dead for its disease, output "God".
If the result is uncertain, output "Cannot be determined"

输入样例
100 1 1000 100 10 10
100 1 1000 100 10 10
输出样例
Player2
Player2

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-3582

最后修改于 2020-10-29T07:05:10+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000 65536