贪心
文章平均质量分 86
皮科克
这个作者很懒,什么都没留下…
展开
-
HDU 6015 Skip the Class【贪心】【map】
题目戳我呀 Problem Description Finally term begins. luras loves school so much as she could skip the class happily again.(wtf?) Luras will take n lessons in sequence(in another word, to have a chance ...原创 2017-03-08 16:56:18 · 625 阅读 · 0 评论 -
HDU 1789 Doing Homework again【贪心】
题目来戳呀Problem DescriptionIgnatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands i原创 2017-03-07 21:15:35 · 217 阅读 · 0 评论 -
贪心算法与动态规划算法的异同
今天比赛硬是把贪心做成了背包问题,气哭口亨!动态规划和贪心算法都是一种递推算法,均由局部最优解来推导全局最优解 。渊博二转但是最后树的原创很精彩贪心算法: 不断贪心地选取当前最优策略的算法设计方法。 1.贪心算法中,作出的每步贪心决策都无法改变,因为贪心策略是由上一步的最优解推导下一步的最优解,而上一部之前的最优解则不作保留。 2.由(1)中的介绍,可以知道贪心法正确的条件是:每一步的最优转载 2017-03-12 19:55:30 · 18035 阅读 · 0 评论 -
HDU 3348 coins【贪心】
题目来戳呀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 into 1原创 2017-03-12 21:29:00 · 463 阅读 · 0 评论 -
HDU 6047 Maximum Sequence【贪心】
题目来戳呀Problem DescriptionSteph is extremely obsessed with “sequence problems” that are usually seen on magazines: Given the sequence 11, 23, 30, 35, what is the next number? Steph always finds them too原创 2017-07-30 23:45:56 · 233 阅读 · 0 评论 -
HDU 6034 Balala Power!【贪心】
Problem Description Talented Mr.Tang has n strings consisting of only lower case characters. He wants to charge them with Balala Power (he could change each character ranged from a to z into each numb原创 2017-07-26 15:58:28 · 338 阅读 · 0 评论