Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
Statistical Charts
Submit Problem
Online Status
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Last Hit
Time Limit: 2000MSMemory Limit: 65536K
Total Submissions: 631Accepted: 8


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.


  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"

Sample Input

100 1 1000 100 10 10
100 1 1000 100 10 10

Sample Output



[Submit]   [Go Back]   [Status]   [Discuss]

Home Page   Go Back  To top

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator