#P7610. Battle Simulation: Duel of Champions
Battle Simulation: Duel of Champions
Battle Simulation: Duel of Champions
In this problem, two champions enter into a duel. Each champion is characterized by three basic parameters: maximum health points (HP), base attack power (atk), and base defense (def). Initially, the champion's health is set to HP. The effective attack power is defined as (A = \max(atk,1)). During an ordinary attack, the damage inflicted is computed as (\max(A - def, 0)). The duel proceeds in rounds: in each round, Alice attacks first and then Bob retaliates. After an attack, if the opponent's health becomes less than or equal to 0, the duel ends immediately and the attacking side wins. If both champions are unable to inflict any damage (i.e. both damage values equal 0), the duel would continue indefinitely. In that case, output a draw. Your task is to simulate the duel and determine the winner.
Mathematically, let the effective attack power for a champion be defined as (A = \max(atk, 1)). If one champion with parameters ( (HP, atk, def) ) attacks an opponent with defense parameter (def_{opponent}), the damage is (damage = \max(A - def_{opponent}, 0)). The duel continues round by round until one champion's remaining health (hp) becomes (\le 0). If both champions have a damage value of 0, the duel is declared a draw.
Note that Alice always initiates the attack in each round.
inputFormat
The input consists of two lines. The first line contains three space‐separated integers representing Alice's parameters: HP, atk, and def. The second line contains three space‐separated integers representing Bob's parameters: HP, atk, and def.
outputFormat
Output a single line containing one of the following strings:
- "Alice" if Bob's champion dies first.
- "Bob" if Alice's champion dies first.
- "Draw" if both champions are incapable of inflicting any damage, leading to an endless duel.
sample
10 5 3
12 4 1
Alice