上一页 1 ··· 8 9 10 11 12 13 14 15 下一页
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=2159Problem Description最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产生的厌恶感,但又不得不通过杀怪来升完这最后一级。现在的问题是,xhd升掉最后一级还需n的经验值,xhd还留有m的忍耐度,每杀一个怪xhd会得到相应的经验,并减掉相应的忍耐度。当忍耐度降到0或者0以下时,xhd就不会玩这游戏。xhd还说了他最多只杀s只怪。请问他能升掉这最后一级吗?Input输入数据有多组,对于每组数据第一行输入n,m,k,s(0 < 阅读全文
posted @ 2011-08-11 20:01 淡墨æ末央 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=2844Problem DescriptionWhuacmers use coins.They have coins of value A1,A2,A3...An Silverland dollar. One day Hibix opened purse and found there were some coins. He decided to buy a very nice watch in a nearby shop. He wanted to pay the exact price(without 阅读全文
posted @ 2011-08-11 14:46 淡墨æ末央 阅读(470) 评论(0) 推荐(0) 编辑
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=2069Problem DescriptionSuppose there are 5 types of coins: 50-cent, 25-cent, 10-cent, 5-cent, and 1-cent. We want to make changes with these coins for a given amount of money.For example, if we have 11 cents, then we can make changes with one 10-cent coin 阅读全文
posted @ 2011-08-08 20:39 淡墨æ末央 阅读(1115) 评论(2) 推荐(0) 编辑
摘要: 链接:http://openoj.awaysoft.com/JudgeOnline/problem.php?id=1574Description有n 种颜色的球,每种颜色的球的个数有任意多个,从中取m个,问有多少种取法Input每行2个正整数 n,m(<=31) ,n=0,m=0结束. Output输出有多少种取法Sample Input2 23 30 0Sample Output310本题是一个纯组合问题,题意也比较简单即:从无限多重集中取若干元素的组合数N = C( n+m-1 , m )再通过组合数性质C( n, m ) = C( n-1, m ) + C( n-1, m-1 ), 阅读全文
posted @ 2011-08-07 19:36 淡墨æ末央 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=1131Problem DescriptionAnother common social inability is known as ACM (Abnormally Compulsive Meditation). This psychological disorder is somewhat common among programmers. It can be described as the temporary (although frequent) loss of the faculty of sp 阅读全文
posted @ 2011-08-05 21:08 淡墨æ末央 阅读(501) 评论(0) 推荐(0) 编辑
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=1023Problem DescriptionAs we all know the Train Problem I, the boss of the Ignatius Train Station want to know if all the trains come in strict-increasing order, how many orders that all the trains can get out of the railway.InputThe input contains severa 阅读全文
posted @ 2011-08-05 17:51 淡墨æ末央 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=1017Problem DescriptionGiven two integers n and m, count the number of pairs of integers (a,b) such that 0 < a < b < n and (a^2+b^2 +m)/(ab) is an integer.This problem contains multiple test cases!The first line of a multiple input is an integer 阅读全文
posted @ 2011-08-04 15:20 淡墨æ末央 阅读(607) 评论(0) 推荐(0) 编辑
摘要: 链接:http://oj.innlab.net/JudgeOnline/problem.php?id=1504DescriptionJesse是个数学迷,他最喜欢研究“哥德巴赫猜想”,因此他的计算机密码也都采用素数。 但一直用同一个密码是不安全的,所以他要经常更换他的密码。但他只允许自己的密码中出现某些数字,且密码的每一位都不相同。比如1 2 4,则有6种情况124 142 214 241 412 421。其中241 和 421为素数。为了获得他的密码(他的机器上存放了第4届舜禹杯大学生程序设计竞赛的题目!),需要生成一个字典来帮助我们破解。 请你来编写一个程序帮助我们(因为众所周知的原因我们 阅读全文
posted @ 2011-08-04 14:33 淡墨æ末央 阅读(506) 评论(0) 推荐(0) 编辑
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=2111Problem Description话说上回讲到海东集团面临内外交困,公司的元老也只剩下XHD夫妇二人了。显然,作为多年拼搏的商人,XHD不会坐以待毙的。一天,当他正在苦思冥想解困良策的时候,突然想到了自己的传家宝,那是公司成立的时候,父亲作为贺礼送来的一个锦囊,徐父当时交代,不到万不得已的时候,不要打开它。“现在不正是最需要的时候吗?”,一边想,XHD一边找到了这个精心保管的锦囊,打开一看,里面只有一句话“杭城北麓千人洞有宝”。二话不说,XHD拿起一个大口袋就出发了,这个千人洞他是知道的,小的 阅读全文
posted @ 2011-05-25 21:45 淡墨æ末央 阅读(400) 评论(1) 推荐(0) 编辑
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=1879Problem Description省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。现得到城镇道路统计表,表中列出了任意两城镇间修建道路的费用,以及该道路是否已经修通的状态。现请你编写程序,计算出全省畅通需要的最低成本。Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( 1< N < 100 );随后的 N(N-1)/2 行对应村庄间道路的成本及修建状态,每行给4个正整数,分别是两个村庄 阅读全文
posted @ 2011-05-20 14:53 淡墨æ末央 阅读(338) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 下一页