![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
贪心算法
文章平均质量分 73
Lee丶0767
这个作者很懒,什么都没留下…
展开
-
SDAU贪心专题 06 电梯
1:问题描述 Problem Description The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in spe原创 2016-03-20 15:44:19 · 341 阅读 · 0 评论 -
SDAU 贪心专题 总结
我觉得贪心是一个比较简单的算法吧,就是由局部最优解,推到整体的最优解就好了,不过也有很大的局限性,很多问题并不能简单的用贪心解决。 如果一个问题可以同时用几种方法解决,贪心算法应该是最好的选择之一。 大致模板就是,将一个问题分解成众多小问题,然后求小问题的最优解,再应用到整体,那么就可以达到整体最优的目的~~原创 2016-04-10 15:45:08 · 208 阅读 · 0 评论 -
SDAU 贪心专题 01 小木棍
1:问题描述 Problem DescriptionThere is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodworking machine in one by one fashio原创 2016-03-18 13:20:04 · 336 阅读 · 0 评论 -
SDAU 贪心专题 14 小船过河
1:问题描述 Problem Description Before bridges were common, ferries were used to transport cars across rivers. River ferries, unlike their larger cousins, run on a guide line and are powered by the river’原创 2016-03-21 23:17:41 · 515 阅读 · 0 评论 -
SDAU 贪心算法 03 霍夫曼树
1:问题描述 Problem Description An entropy encoder is a data encoding method that achieves lossless data compression by encoding a message with “wasted” or “extra” information removed. In other words, ent原创 2016-03-21 23:33:38 · 449 阅读 · 0 评论 -
SDAU 贪心专题 15 牛奶问题
1:问题描述 Problem Description The cows have purchased a yogurt factory that makes world-famous Yucky Yogurt. Over the next N (1 <= N <= 10,000) weeks, the price of milk and labor will fluctuate weekly s原创 2016-03-21 23:09:34 · 319 阅读 · 0 评论 -
SDAU 贪心专题 13 盈利问题
1:问题描述 Problem Description Accounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc. All what they remember is that MS原创 2016-03-21 22:52:35 · 219 阅读 · 0 评论 -
SDAU 贪心专题 11 雷达
1:问题描述 Problem Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar in原创 2016-03-21 12:38:55 · 217 阅读 · 0 评论 -
SDAU 贪心专题 12 根号问题
1:问题描述 Problem Description Current work in cryptography involves (among other things) large prime numbers and computing powers of numbers among these primes. Work in this area has resulted in the pra原创 2016-03-21 12:46:44 · 242 阅读 · 0 评论 -
SDAU 贪心专题 10 颜料问题
1:问题描述 Problem Description The local toy store sells small fingerpainting kits with between three and twelve 50ml bottles of paint, each a different color. The paints are bright and fun to work with,原创 2016-03-21 09:34:39 · 364 阅读 · 0 评论 -
SDAU 贪心专题 07 赛跑问题
1:问题描述 Problem Description A relay is a race for two or more teams of runners. Each member of a team runs one section of the race. Your task is to help to evaluate the results of a relay race. You ha原创 2016-03-21 09:13:24 · 306 阅读 · 0 评论 -
SDAU 贪心专题 05 换硬币
1:问题描述 Problem Description “Yakexi, this is the best age!” Dong MW works hard and get high pay, he has many 1 Jiao and 5 Jiao banknotes(纸币), some day he went to a bank and changes part of his money i原创 2016-03-21 09:00:07 · 517 阅读 · 0 评论 -
SDAU 贪心专题 02 田忌赛马
1:问题描述 Problem Description Here is a famous story in Chinese history. “That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to play horse racing with the k原创 2016-03-20 16:19:47 · 271 阅读 · 0 评论 -
SDAU 贪心专题 04 节目安排
1:问题描述 Problem Description “今年暑假不AC?” “是的。” “那你干什么呢?” “看世界杯呀,笨蛋!” “@#$%^&*%…”确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。 作为球迷,一定想看尽量多的完整的比赛,当然,作为新时代的好青年,你一定还会看一些其它的节目,比如新闻联播(永远不要忘记关心国家大事)、非常6+7、超原创 2016-03-20 18:15:37 · 333 阅读 · 0 评论 -
SDAU 贪心专题 00 搬桌子
1:问题描述Problem DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure.The floor has 200 rooms each on the north side and sout原创 2016-03-20 15:32:21 · 423 阅读 · 0 评论 -
SDAU 贪心专题 17 小箱子
1:问题描述Problem DescriptionA factory produces products packed in square packets of the same height h and of the sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These products are always delivered to customers in the原创 2016-03-20 15:40:49 · 300 阅读 · 0 评论 -
SDAU 贪心专题 16 中位数
1:问题描述Problem DescriptionFJ is surveying his herd to find the most average cow. He wants to know how much milk this ‘median’ cow gives: half of the cows give as much or more than the median; half give原创 2016-03-20 15:42:32 · 388 阅读 · 0 评论 -
数位专题B-number HDU 3652
问题描述: Description A wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string “13” and can be divided by 13. For example, 130 and 2613 are wqb-numbers,原创 2016-08-21 22:22:21 · 211 阅读 · 0 评论