Problem G
Splay the Spire
Languages
en
is
Atli is wasting his time by playing computer games, as
usual. Currently he is playing the game Splay the
Sire. He is currently figuring out how to defeat an enemy
while only having a few cards left. The battle proceeds with
Atli playing a card from his hand, then the enemy damages Atli
by a fixed amount and this is then repeated. First one to lose
all of their hit points loses. If both Atli and the enemy reach
Name |
Effect |
Lay into |
Damage an enemy by |
Power up |
Increase own strength value by |
Whack |
Damage the enemy by |
Haymaker |
Damage the enemy by |
Surpass limits |
Double own strength value |
Dirty tactics |
Lower the enemy’s strength value by |
Bandages |
Increase own life points by |
Xzodiac |
Win instantly if own strength value is more than twice of your own current health points |
Input
The first line of the input contains three positive integers
Output
If Atli can not win, print ‘Engin vinningsleid!’. Otherwise first print the number of cards Atli will play on its own line. Then print that many lines, each with the name of one card, in the same order as Atli plays them. Do not print any cards that would be played after he has already won. If there is more than one way to win, any one of them will suffice.
Sample Input 1 | Sample Output 1 |
---|---|
10 10 1 2 Lay into Power up |
2 Power up Lay into |
Sample Input 2 | Sample Output 2 |
---|---|
8 27 3 7 Bandages Power up Whack Power up Dirty tactics Haymaker Power up |
7 Bandages Power up Power up Dirty tactics Power up Whack Haymaker |
Sample Input 3 | Sample Output 3 |
---|---|
7 1000000 1 6 Power up Bandages Power up Whack Surpass limits Xzodiac |
5 Power up Power up Whack Surpass limits Xzodiac |
Sample Input 4 | Sample Output 4 |
---|---|
1 100 1 4 Whack Whack Lay into Power up |
Engin vinningsleid! |