
HDOJ上的题
software_kid
这个作者很懒,什么都没留下…
展开
-
HDOJ2084数塔问题
Problem Description在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:(o(╯□╰)o……图貌似没有复制上,不想传了,一搜HDOJ2084就都知道了)有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个DP的题目,你能AC吗? Input输入数据首先包括一个整数C,表示原创 2012-04-08 20:48:19 · 526 阅读 · 0 评论 -
HDU1019 The Least Common Multiple
题目:Problem DescriptionThe least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7原创 2012-04-30 11:36:11 · 757 阅读 · 0 评论 -
HDU1014uniform generator
Problem DescriptionComputer simulations often require random numbers. One way to generate pseudo-random numbers is via a function of the formseed(x+1) = [seed(x) + STEP] % MODwhere '%' is th原创 2012-05-01 00:09:25 · 508 阅读 · 0 评论 -
HDU1108最小公倍数
Problem Description给定两个正整数,计算这两个数的最小公倍数。 Input输入包含多组测试数据,每组只有一行,包括两个不大于1000的正整数. Output对于每个测试用例,给出这两个数的最小公倍数,每个实例输出一行。Sample Input10 14Sample Output70//思路,最小公倍数=两数之积除以两数最大公约数#in原创 2012-04-30 21:33:26 · 554 阅读 · 0 评论 -
HDU 1258
这是我没有经过讨论写出来的,思维比较狭隘些吧,因为有人比我快很多AC了,所以希望看过我的代码的高手们给我提些建议和意见~谢谢咯~如果有比较简单高效的方法也请留言~~欢迎欢迎~~/*HDU 1258 SUM IT UPSample Input4 6 4 3 2 2 1 15 3 2 1 1400 12 50 50 50 50 50 50 25 25 25 25 25 250 0Sa原创 2012-07-15 11:27:03 · 798 阅读 · 1 评论