题意: 小黑的镇魂曲 Problem Description 这个事情发生在某一天,当小黑和SSJ正在约会的时候,邪恶的Guner抓走了SSJ,小黑伤心万分,怒不可遏啊!但是他显然也是没有办法的,谁叫Guner比小黑邪恶,小黑打不过Guner呢!于是,小黑利用皮肤保护色,趁夜摸黑前往Guner的城堡,准备偷偷摸摸的把SSJ拯救出来,但是只要小黑一打开SSJ身上的锁链,看门的葱头就会在M秒以内通知Guner,Guner马上超时空转移,闪到小黑…
How many ways?? Time Limit:1000 MS Memory Limit: 32768 K Problem Description 春天到了, HDU校园里开满了花, 姹紫嫣红, 非常美丽. 葱头是个爱花的人, 看着校花校草竞相开放, 漫步校园, 心情也变得舒畅. 为了多看看这迷人的校园, 葱头决定, 每次上课都走不同的路线去教室, 但是由于时间问题, 每次只能经过k个地方, 比方说, 这次葱头决定经过2个地方, 那他可以先去问鼎广场看看喷泉, 再去教室, 也可以先到体育场…
Hunter Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2014 Accepted Submission(s): 615 Problem Description One day, a hunter named James went to a mysterious area to find the treasures. Jame…
Trade Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 3401 Appoint description: Description Recently, lxhgww is addicted to stock, he finds some regular patterns after a few days' study. He fo…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1085 解题报告:有1,2,5三种面值的硬币,这三种硬币的数量分别是num_1,num_2,num_5,问你不能凑的钱的最小值是多少. DP,开一个这样的数组dp[i][3],然后dp[i][0]表示凑成 i 元钱需要dp[i][0]张1块的,需要dp[i][1]张两块的,dp[i][2]张5块的,然后依次往后递推,得到 i 的途径一共有三种,第一种是i-1加一张一块的,第二种是i-2加上1张两块的,…
传送门:hdu 5800 To My Girlfriend 题意:给定n个物品,其中i,j必选,l,m必不选,问组成体积为s的方法一共有多少种 思路:定义dp[i][j][s1][s2],表示前i种物品能够构成的体积为j,其中有s1种定为必选,s2种定为不必选;因为递推到第i层时,只与第i-1层有关,所以把第一维降到2来省内存.然后就是dp[i][j][s1][s2]=dp[i-1][j][s1][s2]+dp[i-1][j][s1][s2-1]+dp[i-1][j-a[i]][s1-1][s2…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5115 Dire Wolf Time Limit: 5000/5000 MS (Java/Others)Memory Limit: 512000/512000 K (Java/Others) 问题描述 Dire wolves, also known as Dark wolves, are extraordinarily large and powerful wolves. Many, if not…
A - Robberies Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 2955 Appoint description: Description The aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usu…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4064 Problem Description Carcassonne is a tile-based board game for two to five players.Square tiles are printed by city segments,road segments and field segments. The rule of the game is to put the tile…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5763 Another Meaning Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others) 问题描述 As is known to all, in many cases, a word has two meanings. Such as "hehe", which not only…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5781 ATM Mechine Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) 问题描述 Alice is going to take all her savings out of the ATM(Automatic Teller Machine). Alice forget how m…