第七届 山东省ACM Execution of Paladin(水题)
来源:互联网 发布:西西软件 下载 编辑:程序博客网 时间:2024/06/06 05:31
Execution of Paladin
Problem 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
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
Example Input
33 1Coldlight OracleColdlight OracleMurloc Warleader3 8Old Murk-EyeOld Murk-EyeColdlight Oracle7 30Old Murk-EyeBluegill WarriorBluegill WarriorMurloc WarleaderMurloc WarleaderColdlight OracleColdlight Oracle
Example Output
Tell you a joke, the execution of Paladin.Mrghllghghllghg!Tell you a joke, the execution of Paladin.
Hint
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.
Author
#include <bits/stdc++.h>using namespace std;int sum1,sum2,sum3;char s1[10],s2[10];int main(){ int n,m; int T; scanf("%d",&T); while(T--) { scanf("%d %d",&n,&m); sum1 = sum2 = sum3 = 0; int num = 0; for(int i = 0 ;i<n;i++) { scanf("%s %s",s1,s2); if(s1[0] =='C') continue; if(s1[0] == 'M') sum2++; else if(s1[0] == 'B') sum1+=2,num++; else if(s1[0] == 'O') sum1+=2,sum3++,num++; } int sum = sum2*2*num+sum1+sum3*(n-1); if(sum>=m) printf("Mrghllghghllghg!\n"); else printf("Tell you a joke, the execution of Paladin.\n"); } return 0;}
- 第七届 山东省ACM Execution of Paladin(水题)
- Execution of Paladin(山东省第七届acm j题)
- 第七届ACM山东省赛-J Execution of Paladin
- 山东省第七届ACM省赛 Execution of Paladin
- 山东省第七届ACM大学生程序设计竞赛-Execution of Paladin(炉石传说-模拟)
- 炉石传说 (Execution of Paladin)
- Execution of Paladin 圣骑士的斩杀(省赛~模拟)
- 第七届ACM山东省赛-E The Binding of Isaac
- 山东省第七届ACM省赛------The Binding of Isaac
- 第七届山东省ACM省赛 E The Binding of Isaac
- 第七届 山东省ACM The Binding of Isaac(搜索OR暴力。。)
- 第七届 山东省ACM Swiss-system tournament(归并思想)
- 第七届 山东省ACM Memory Leak(模拟 待整理)
- 山东省第七届 ACM 省赛 Proxy (最短路)
- 山东省第七届ACM省赛题——Fibonacci(二分)
- 山东省第七届 ACM 省赛 Feed the monkey (dp)
- 【第七届山东省ACM竞赛】Square Number
- 2016第七届ACM山东省赛
- Python+Selenium中级篇之7-Python中字符串切割操作
- debug New table
- Java总结篇系列:Java多线程(一)
- 画图板
- activity跳转&传参
- 第七届 山东省ACM Execution of Paladin(水题)
- Linked List Random Node
- 《疯狂JAVA讲义》之四——编写并编译、运行第一个java程序
- light oj 1422 Halloween Costumes (区间DP)
- js循环的demo
- 关于setInterval和setTImeout中的this指向问题
- 笔记本更换SSD和光驱硬盘架
- 基于Qt与OpenCV的图片读取、保存,并利用Canny进行简单的边缘处理结果显示
- activity四种启动模式