Last One Standing
시간 제한2초메모리 제한1024 MB
체력, 공격력, 재장전 시간이 주어진 두 유닛이 싸울 때 최적의 플레이에서 누가 이기는지, 아니면 둘 다 파괴되는지 판정한다.
문제
In a computer game units are described by their health , damage , and time to reload .
When such a unit fires a missile at an opposing one --- the opponent's health is decreased by seconds after the missile is fired. The time between consecutive missile launches for the same unit should be at least seconds.
For simplicity, we assume the missile supply to be infinite for all units in the game.
Two players --- one controlling a unit with health , damage and time to reload , and the second with a unit described by , and --- have engaged in a fight in this computer game. Both units are fully reloaded at the beginning of the fight and can fire missiles immediately.
The unit is destroyed when its health becomes zero or negative. A player wins if there is a moment in time such that the opponent's unit is destroyed, while theirs is not.
Since it takes 0.5 seconds for a missile to reach its target, it is possible for both units to fire missiles at the same time and ultimately destroy each other.
You are to determine who wins in case both players act optimally.
입력
- One line containing the integer numbers , and ().
- One line containing the integer numbers , and ().
출력
Output the phrase player one if the first player wins, player two if the second player wins, or draw if neither player wins.