Shandong Province Seventh Annual ACM Contest J question Execution of Paladin (test instructions AH)

Source: Internet
Author: User

Test instructions: Fish man is a strong race in the furnace stone, in the Explorers Association, the Paladin has a new card, called the return of the deceased, the effect is to summon the game of 7 dead fish people. If there are fewer than 7 dead, then the number of calls will be less than 7.

There are a lot of fish people, the following 4 are:

The wise: 3 fee, 2 attack, 2 blood, war roar: Each player draw 2 cards each.

Fish leader: 3 fee, 3 attack, 3 blood, other fish people get +2/+1.

Blue Cheek Warrior: 2 fee, 2 attack, 3 blood, charge.

Old Blind: 4 fee, 2 attack, 3 blood, charge. Each of the 1 other fish on the battlefield will get +1 attacks.

Here are some notes:

Mana: Summons the attendant's consumption. The companion of the skill effect summons does not consume extra mana, only consumes the card's mana, and both players have up to 10 mana.

Attack: The attendant can inflict damage every time.

Roar: A companion who has a roar effect that triggers this effect when it is played from a hand. A companion who is summoned by skill does not trigger a roar.

Charge: Originally, in summoned out of this round, the attendant is not able to attack, but there is charge can. The summon round can be attacked directly.

Battlefield: Battlefield (game disk), the game where various content occurs, each game occurs on the board.

+2/+1:+2 Attack and +1 blood volume.

Now, it's your turn to make a card, you have 10 mana, only one dead person returns. There is no entourage on the battlefield, which means that your followers can directly attack the opponent's heroes. Do you remember the fish people you have been out of, but also know the blood of the opponent hero, then you can use the only card in the hand to win the victory?

Input

Multiple test scenarios, line 1th includes integer 7 (7<=22000), indicating the number of tests.

The 1th line of each test consists of 2 integer,n (dead Fish Man, 0<=n<=7), H (Heroic blood volume, 0

In subsequent n lines, each row includes a string representing the name of the dead fish, and the string can only be: "The wise man of the coldness", "The Fish Leader", "The Blue Cheek Warrior", "the Old Blind".

Output

Once you have listed all the options, if you can win the game, then output the "cheering cheerleader!" "(no quotation marks), otherwise the output" tell you a joke: Paladin's Kill. " Use the entourage to attack enemy heroes, so that their blood volume is less than or equal to 0 to win.

Example

Input Output

3

3 1

The wise man of coldness

The wise man of coldness

Fish Man leader

3 8

Old Blind

Old Blind

The wise man of coldness

7 30

Old Blind

Blue Gill Warrior

Blue Gill Warrior

Fish Man leader

Fish Man leader

The wise man of coldness

The wise man of coldness

Tell a joke: the Kill of a holy ride

Uralalala Quack

Tell a joke: the Kill of a holy ride

Tips

In the 1th scenario, the fish were unable to attack.

In the 2nd scenario, every old blind has +2 attacks, because the other is an old blind and a wise man of coldness, so the total damage is 8.

In the final scenario, the old blind has 12 attacks (2 base attacks, 6 other attendants, 2 fish leaders, 2 blue-bearded Warriors with 6 attacks (2 base attack, 2 fish leaders) and therefore total damage is 24).

Analysis: Wool Ah, this question, is what Ah, is the furnace stone game, if did not play the small partner can be miserable, because this test instructions particularly bad understanding, the key is to pick the word.

Mainly in this charge, that is, if there is no charge of the fish people, is not able to attack, that is, only the old blind main blue Gill warrior can be attacked, the other can only provide skills,

The wise man has no skills, only the number of people, not the number of fish, because for the old blind, for every other fish can add a damage, and then the fish leader can give the fish plus 2 damage.

So the answer comes out, first is the Old blind and Blue Gill Warrior's Attack + (n-1) * The number of old blind, this is its skills, coupled with the fish leader of the Old Blind and Blue Gill Warrior.

The code is as follows:

#include <iostream> #include <cstdio> #include <cstring>using namespace std;const int maxn = 100;char s[ Maxn];int Main () {    int T, n, M;  Cin >> T;    while (t--) {        scanf ("%d%d", &n,&m);        GetChar ();        int o = 0, b = 0, w = 0;        for (int i = 0; i < n; ++i) {            gets (s);            if (' B ' = = S[0])   ++b;            else if (' M ' = = S[0])  ++w;            else if (' O ' = = S[0])  ++o;        }        int ans = (n-1) * O + 2 * (b+o) + 2*w * (o+b);        if (ans >= m)   puts ("mrghllghghllghg!");        Else  puts ("Tell you a joke, the execution of Paladin.");    }    return 0;}

Shandong Province Seventh Annual ACM Contest J question Execution of Paladin (test instructions AH)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.