Hamburger Magi(hdu 3182)】的更多相关文章

Hamburger Magi Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 437    Accepted Submission(s): 144 Problem Description In the mysterious forest, there is a group of Magi. Most of them like to eat…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3182 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description In the mysterious forest, there is a group of Magi. Most of them like to eat human beings, so the…
题目链接:pid=3182">http://acm.hdu.edu.cn/showproblem.php?pid=3182 Problem Description In the mysterious forest, there is a group of Magi. Most of them like to eat human beings, so they are called "The Ogre Magi", but there is an special one…
题意 大致是: 有n个汉堡 m块钱  (n<=15) 然后分别给n个汉堡的能量 再分别给n个汉堡所需的花费 然后下面n行 第i行有x个汉堡要在i汉堡之前吃 然后给出这x个汉堡的编号 输出 能获得的最大能量 分析: n那么小, 很明显状压 状压吃的顺序 每个汉堡的花费是固定的, 因此只要一维的dp  再加个数组 记录当前状态的花费 即可 状态转移前判断 当前是否满足 顺序 以及 花费 #include <cstdio> #include <cstdlib> #include &…
t组数据 n个汉堡 e的能量 接下来的2行 val    n个 得到的权 cost  n个 花去的能量 接下来n行 每行一个q  q个数字 代表这类汉堡做好要的前提  每个汉堡只能用一次 #include<stdio.h> #include<algorithm> #include<string.h> using namespace std; #define MAXN 1<<15 int dp[MAXN]; ],co[]; ]; int cost[MAXN];…
Description Kiki likes traveling. One day she finds a magic lamp, unfortunately the genie in the lamp is not so kind. Kiki must answer a question, and then the genie will realize one of her dreams. The question is: give you an integer, you are allowe…
Hamburger Magi Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 509    Accepted Submission(s): 163 Problem Description In the mysterious forest, there is a group of Magi. Most of them like to eat…
ZOJ 3182 Nine Interlinks 题目大意:把一些带标号的环套到棍子上,标号为1的可以所以操作,标号i的根子在棍子上时,只有它标号比它小的换都不在棍子上,才能把标号为i+1的环,放在棍子上或者取下,问n个环全部放在棍子上需要的最少步骤? 一个简单的递推题,可是我硬生生想复杂了还把队友带偏了,真是惭愧,还好源源的一发强大的思路,简简单单就过了,源源太强了,tql,orz.我们以4个环全放上棍子为例,我们要先把第3个环放上,然后又把前两个环都取下,然后才能放上第4个环,再又把前两个环…
http://acm.split.hdu.edu.cn/showproblem.php?pid=3853 LOOPS Problem Description   Akemi Homura is a Mahou Shoujo (Puella Magi/Magical Girl). Homura wants to help her friend Madoka save the world. But because of the plot of the Boss Incubator, she is t…
HDU 4041 Eliminate Witches! (模拟题 ACM ICPC 2011 亚洲北京赛区网络赛题目) Eliminate Witches! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 863    Accepted Submission(s): 342 Problem Description Kaname Mado…