SDNU 1512.J.Execution of Paladin

Description

Murloc is a powerful race in Hearthstone. In the set League of Explorers, a new Paladin ability card called Anyfin Can Happen is released with the ability to summon 7 Murlocs that died this game. If there aren’t enough dead Murlocs, it may summon less than 7 Murlocs.
        

There are many different minions in Murloc race, here are four of them:

Coldlight Oracle: 3 MANA, 2 ATTACK, 2 HP. Battlecry: Each player draws 2 cards.

Murloc Warleader: 3 MANA, 3 ATTACK, 3 HP. ALL other Murlocs have +2/+1.

Bluegill Warrior: 2 MANA, 2 ATTACK, 3 HP. Charge.

Old Murk-Eye: 4 MANA, 2 ATTACK, 3 HP. Charge. Has +1 Attack for each other Murloc on the Battlefield.



Here are some explanations:

MANA: The cost of summon the minion. Minions summoned by ability cards cost no mana besides the cost of the ability cards. Every player has 10 MANAs at most.

ATTACK: How many damage can the minion make once.

HP: How many attacks can the minion or heroes take.

Battlecry: An ability where a particular effect activates when the card with the Battlecry is played directly from the hand. The minions summoned by ability won’t activate their Battlecry.

Charge: Minions cannot attack at once when they are summoned unless they have Charge description. They will have to wait until next turn.

Battlefield: The battlefield (or game board) is where the action takes place, representing the board on which each game is played out.

+2/+1: +2 ATTACK and +1 HP.

 

Now, it is your turn. You have 10 MANAs and only one card: Anyfin Can Happen. There are nothing on the Battlefield, which means your minions can directly attack enemy hero. You can remember the list of dead Murlocs. You know how many HP the enemy hero remains. Will you win this game through this only card you have?

Input

 Multiple test cases. The first line contains an integer T (T<= 22000), indicating the number of test case.

The first line of each test contains two integers, n (the number of dead Murlocs, 0 <= n <= 7) and h (the HP of enemy hero, 0 < h <= 30).

Then n lines follows, each line contains a string, indicates the name of dead Murloc. The string will only be “Coldlight Oracle”, “Murloc Warleader”, “Bluegill Warrior” or “Old Murk-Eye”.

 

Output

 One line per case. If you can win the game in this turn, output “Mrghllghghllghg!”(Without quotes). Otherwise, output “Tell you a joke, the execution of Paladin.” You will win the game if you attack enemy hero with your minions and make his/her HP less or equal than 0.

Sample Input

3
3 1
Coldlight Oracle
Coldlight Oracle
Murloc Warleader
3 8
Old Murk-Eye
Old Murk-Eye
Coldlight Oracle
7 30
Old Murk-Eye
Bluegill Warrior
Bluegill Warrior
Murloc Warleader
Murloc Warleader
Coldlight Oracle
Coldlight Oracle

Sample Output

Tell you a joke, the execution of Paladin.
Mrghllghghllghg!
Tell you a joke, the execution of Paladin.

Hint

 In the first test case, none of the Murlocs can attack.

In the second test case, every Old Murk-Eye has +2 ATTACK because there is another Old Murk-Eye and a Coldlight Oracle. So the total damage is 8.

 

In the last test case, Old Murk-Eye has 12 ATTACK (2 basic ATTACK, 6 other Murlocs and 2 Murloc Warleader), two Bluegill Warriors has 6 ATTACK(2 basic ATTACK, and 2 Murloc Warleader) each. So the total damage is 24.

Source

Unknown

题意:鱼人是炉石里的一支强大种族,在探险者协会里,圣骑士有了一张新牌,叫亡者归来,效果是召唤本轮游戏中7个已死鱼人。如果死掉的不足7个,那么召唤的数量就会不足7。

  鱼人有很多,下面的4个是:

  寒光智者:3费,2攻,2血,战吼:双方玩家各抽2张牌。

  鱼人领军:3费,3攻,3血,其他鱼人获得+2/+1。

  蓝腮战士:2费,2攻,3血,冲锋。

  老瞎眼:4费,2攻,3血,冲锋。战场上每有1个其他鱼人就会使其获得+1攻击。

  下面给一些说明:

  法力:召唤随从的消耗。技能效果召唤的随从不消耗额外法力,只会消耗卡牌本身法力,双方玩家最多有10点法力。

  攻击:随从每次能造成的伤害。

  战吼:拥有战吼效果的随从,在从手牌里打出时会触发这个效果。被技能召唤的随从不会触发战吼。

  冲锋:本来,在召唤出来的这一轮,随从是无法攻击的,但是有冲锋就可以。在召唤回合可以直接攻击。

  战场:战场(游戏盘),游戏各种内容发生的地方,每场游戏都发生在棋盘上。

  +2/+1:+2攻击和+1血量。

  现在,轮到你出牌了,你有10点法力,只剩一张亡者归来。战场上没有任何随从,意味着你的随从可以直接攻击对手英雄。你还记得你出过的鱼人,也知道对手英雄的血量,那你能够用手上唯一这张牌赢得胜利吗?

  输入

  多种测试方案,第1行包括 integer 7 (7<=22000);表示测试数量。

  每个测试的第1行都包括2个integer,n(已死的鱼人,0<=n<=7),h(英雄血量,0

  后续N行里,每行都包括string,表示已死鱼人名称,String只能为:“寒光智者”,“鱼人领军”,“蓝腮战士”,“老瞎眼”。

  输出

  列出所有方案后,如果能赢得游戏,那就输出"乌拉啦啦啦呱啦蛤蛤!"(没有引号),否则输出“跟你说个笑话:圣骑士的斩杀”。使用随从攻击敌人英雄,使其血量少于等于0即可胜利。

  示例

输入输出

3

3 1

寒光智者

寒光智者

鱼人领军

3 8

老瞎眼

老瞎眼

寒光智者

7 30

老瞎眼

蓝鳃战士

蓝鳃战士

鱼人领军

鱼人领军

寒光智者

寒光智者

讲个笑话:圣骑的斩杀

乌拉拉拉拉呱呱

讲个笑话:圣骑的斩杀

  提示

  第1个方案里,鱼人都无法攻击。

  第2个方案里,每个老瞎眼都有+2攻击,因为另外的一个老瞎眼和寒光智者,因此总伤害为8。

  最后一个方案里,老瞎眼有12攻击(2点基础攻击,6个其他随从;2个鱼人领军,2个蓝腮战士有6攻(2基础攻击,2个鱼人领军)因此总伤害是24)。

#include <cstdio>
#include <iostream>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <queue>
#include <vector>
#include <map>
using namespace std;
#define ll long long
ll mod = 1e9+7;

int t, n, h, sum, mana[10], attack[10], hp[10], num, Oldnum, Murlocnum;
string name[10];
bool flag;

int main()
{
    for(scanf("%d", &t); t--;)
    {
        sum = 0;
        flag = 0;
        Oldnum = 0;
        Murlocnum = 0;
        memset(hp, 0, sizeof(hp));
        memset(mana, 0, sizeof(mana));
        memset(attack, 0, sizeof(attack));
        scanf("%d%d", &n, &h);
        getchar();
        for(int i = 0; i<n; i++)
        {
            getline(cin, name[i]);
            if(name[i] == "Old Murk-Eye")
            {
                Oldnum++;
                mana[i] = 4;
                attack[i] = 2;
                hp[i] = 3;
            }
            else if(name[i] == "Murloc Warleader")
            {
                Murlocnum++;
                mana[i] = 3;
                attack[i] = 3;
                hp[i] = 3;
            }
            else if(name[i] == "Coldlight Oracle")
            {
                mana[i] = 3;
                attack[i] = 2;
                hp[i] = 2;
            }
            else if(name[i] == "Bluegill Warrior")
            {
                flag = 1;
                mana[i] = 2;
                attack[i] = 2;
                hp[i] = 3;
            }
        }
        if(Murlocnum || Oldnum)
        {
            for(int i = 0; i<n; i++)
            {
                if(Murlocnum)
                {
                    if(name[i] == "Old Murk-Eye")
                    {
                        attack[i] += (n-1+2*Murlocnum);
                        hp[i] += Murlocnum;
                    }
                    else if(name[i] == "Coldlight Oracle")
                    {
                        attack[i] += (2*Murlocnum);
                        hp[i] += Murlocnum;
                    }
                    else if(name[i] == "Bluegill Warrior")
                    {
                        attack[i] += (2*Murlocnum);
                        hp[i] += Murlocnum;
                    }
                }
                else if(name[i] == "Old Murk-Eye")
                {
                    attack[i] += (n-1);
                    hp[i] += Murlocnum;
                }
            }
        }
        for(int i = 0; i<n; i++)
        {
            if(name[i] == "Coldlight Oracle" || name[i] == "Murloc Warleader")
                attack[i] = 0;
            sum += attack[i];
        }
        if(sum<h)printf("Tell you a joke, the execution of Paladin.\n");
        else printf("Mrghllghghllghg!\n");
    }
    return 0;
}

 

转载于:https://www.cnblogs.com/RootVount/p/11219288.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值