## DMOPC '15 Contest 4 P3 - Lethal

View as PDF

Points: 7 (partial)
Time limit: 0.6s
Memory limit: 64M

Authors:
Problem type

WallE256 and ionutpop118 are playing games of Hearthstone! Hearthstone is a card game in which two players duke it out with minions, spells, and secrets. To keep their game simple, they've decided to use minions only and play according to the following rules:

• Each player starts the game with 30 health
• Each player can have no more than 7 minions on the board
• Each minion has two stats - its attack and health
• Each minion can only attack once per turn, if it attacks another minion, both lose health equivalent to the other's attack, if it attacks the opponent directly, the opposing player loses health equivalent to the minion's attack
• A minion dies if its health reaches 0 or below, similarly, a player wins if the opponent's health reaches 0 or below
• Opponent minions with the special effect taunt must be killed first before attacking the opponent player

A player is considered to have lethal if they can win the game in that turn.

Unfortunately, ionutpop118 has terrible rng luck. He always seems to end up in a terrible situation — with low health and only one taunt minion on the board. It is now WallE256's turn, and he wonders: does he have lethal?

#### Input Specification

The first line of input will contain , the number of games they play.

The second line of each game will contain , the number of minions WallE256 has on the board.

The third line of each game will contain space-separated integers, the attack values of WallE256's minions. Attack values will be no greater than .

The fourth line of each game will contain two space-separated integers, and , ionutpop118's health and his taunt minion's health, respectively.

#### Output Specification

For each game, output LETHAL or NOT LETHAL on a separate line.

#### Sample Input

2
3
3 5 3
4 5
2
5 3
7 4

#### Sample Output

LETHAL
NOT LETHAL

#### Explanations and Illustrations for Sample Output

In the first game, WallE256 can use the 5-attack minion to kill the taunt minion (distinguished by its shield border), then use the 2 3-attack minions to finish ionutpop118 off.

In the second game, there is simply not enough damage for lethal.

• commented on April 14, 2016, 11:06 p.m.

First of all, what about the frostbolts in his hand? 3+3+3=9, which is greater than 7.

Also, (not sure if this was patched) but HysteriA, found a (maybe more?) ways to get more than 7 minions on board

But i guess it makes sense for simplicity

• commented on April 15, 2016, 8:18 a.m.

The initial version of this problem was harder, and this is a simplified version. We promise that in the future we will release the original version.

• commented on April 15, 2016, 9:14 a.m.

Ur mage deck is weird lol

• commented on Jan. 12, 2016, 7:21 p.m.

Maximum health is Jaraxxus at 15, so shouldn't it be 15 instead of 12?

• commented on Jan. 12, 2016, 7:12 p.m. edit 4

worst online game ever (lol fan)

• commented on Jan. 12, 2016, 2:03 p.m.

what's G's interval ?

• commented on Jan. 12, 2016, 2:09 p.m.

Sorry about that, statement has been updated.

• commented on Jan. 12, 2016, 1:01 p.m. edit 3

This comment is hidden due to too much negative feedback. Click here to view it.