Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Language: Last Hit
Description 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:
Input There are several test cases for this problem. All numbers are less than 10000. Output
Sample Input 100 1 1000 100 10 10 100 1 1000 100 10 10 Sample Output Player2 Player2 Source |
[Submit] [Go Back] [Status] [Discuss]
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator