![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
acm贪心算法
夕下醉残枫
一个苦逼的小白僧
展开
-
E
Problem Description“今年暑假不AC?”“是的。”“那你干什么呢?”“看世界杯呀,笨蛋!”“@#$%^&*%...”确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。作为球迷,一定想看尽量多的完整的比赛,当然,作为新时代的好青年,你一定还会看一些其它的节目,比如新闻联播(永远不要忘记关心国家大事)、非常6+7、超级原创 2016-03-15 18:21:41 · 266 阅读 · 0 评论 -
Acm课程总结
Acm课程总结 Acm一开始了解这个是大一的时侯听说有一门特殊的选修课可以在大一选,同时一些学长学姐也说这门课挺难的也很有用,然后我就抱着试试的心态大一去上了前几节,说真的因为是学期末开的课比较突然前几节课其实具体实现并没有很懂只是听懂了一些算法的思想,后来由于我们测试的线性代数与课程冲突,翘了几节线代后线代老师允许了,同时发现线代本身需要学习,于是就放弃了。大二学java的时候想写点小原创 2016-06-30 13:26:45 · 1241 阅读 · 0 评论 -
A
原题:The 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 south sid原创 2016-03-13 22:24:14 · 230 阅读 · 0 评论 -
0
0原创 2016-05-27 14:48:30 · 263 阅读 · 0 评论 -
R
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 sq原创 2016-04-05 17:52:15 · 223 阅读 · 0 评论 -
N
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 Inc. posted a surplus or a原创 2016-03-29 19:45:31 · 268 阅读 · 0 评论 -
贪心算法总结
贪心算法听课的时候本着一重循环排序,找到局部最优解,循环一次由局部最优过渡到整体最优,这种单一的模式,后来做到田忌赛马问题开始发现贪心并不只是一个循环来解决的问题思想,他更多的应该更加强调的是寻找局部最优解由局部最优的最优即为最终解的过程(不一定要用到循环也不一定只用一次循环),其中主要的几种题型,背包问题、木棒问题、节目问题、时间等待分配问题(最基本的用for循环),寻找最优策略问题(田忌赛马,原创 2016-04-05 17:24:09 · 243 阅读 · 0 评论 -
p
Problem DescriptionThe 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 such tha原创 2016-03-22 17:28:47 · 254 阅读 · 0 评论 -
F
Total Submission(s) : 36 Accepted Submission(s) : 15Problem 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原创 2016-03-22 17:21:33 · 299 阅读 · 0 评论 -
I
跟b一样编译器版本低,,而已代码#include#include#includeusing namespace std;struct wood{ int longth; int weight;};bool comp(const wood &m1,const wood &m2){ if (m1.longth==原创 2016-03-17 19:42:09 · 250 阅读 · 0 评论 -
M
Problem DescriptionCurrent 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 practical原创 2016-03-17 18:46:20 · 253 阅读 · 0 评论 -
B
题目描述:There 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 fashion. It needs some time,原创 2016-03-15 17:02:13 · 229 阅读 · 0 评论 -
J
跟博客上d一样~不复制了原创 2016-03-29 19:38:42 · 189 阅读 · 0 评论 -
D
Total Submission(s) : 33 Accepted Submission(s) : 18Problem DescriptionAn entropy encoder is a data encoding method that achieves lossless data compression by encoding a message with “wasted” or原创 2016-03-29 19:22:33 · 221 阅读 · 0 评论 -
G
Problem DescriptionThe 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 specified原创 2016-03-16 22:33:58 · 238 阅读 · 0 评论 -
Q
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 as原创 2016-03-16 22:05:02 · 337 阅读 · 0 评论 -
C
Problem DescriptionHere 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 king an原创 2016-03-16 21:16:09 · 295 阅读 · 0 评论 -
动态规划、分治法与贪心算法的区别
分治法与动态规划的相同点:分治法与动态规划,二者要求原问题具有最有子结构,都是将问题分而治之分解成若干个规模较小的子问题;不同点:动态规划是将原问题分解为多个子问题,通过计算出子问题的结果构造一个最优解。动态规划通过迭代法自底向上求解,动态规划将分解后的子问题理解为相互间有联系,有重叠的部分;算法的应用:装配线,矩阵乘法,最长公共子序列,构造最优的二叉树分治法是将原问题分解转载 2016-06-17 10:15:03 · 2602 阅读 · 0 评论