Logo
(追記) (追記ここまで)

30569번 - Last One Standing 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 (추가 시간 없음) 1024 MB30021219372.285%

문제

In a computer game units are described by their health $h,ドル damage $d,ドル and time to reload $t$.

When such a unit fires a missile at an opposing one --- the opponent's health is decreased by $d$ 0ドル.5$ seconds after the missile is fired. The time between consecutive missile launches for the same unit should be at least $t$ 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 $h_1,ドル damage $d_1$ and time to reload $t_1,ドル and the second with a unit described by $h_2,ドル $d_2$ and $t_2$ --- 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 $h_1,ドル $d_1$ and $t_1$ (1ドル \le h_1, d_1, t_1 \le 1000$).
  • One line containing the integer numbers $h_2,ドル $d_2$ and $t_2$ (1ドル \le h_2, d_2, t_2 \le 1000$).

출력

Output the phrase player one if the first player wins, player two if the second player wins, or draw if neither player wins.

제한

예제 입력 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

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > The UK & Ireland Programming Contest > UKIEPC 2023 L번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /