随笔分类 -  ACM---贪心

摘要:DescriptionThe cows have a line of 20 water bowls from which they drink. The bowls can be either right-side-up (properly oriented to serve refreshing ... 阅读全文
posted @ 2015-12-12 22:09 UniqueColor 阅读(343) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionClarke is a patient with multiple personality disorder. One day, Clarke turned into a cook, was shopping for food. Clarke has bough... 阅读全文
posted @ 2015-11-17 16:08 UniqueColor 阅读(216) 评论(0) 推荐(0) 编辑
摘要:奶牛们建了一家酸奶厂,在N周内每周需要出货Y_i单位酸奶,第i周成本为C_i,储存费为每周S。求总体最低成本。贪心策略是维持每周的最低单位成本,每周可能用上周剩下的,也可能生产新的。于是该周单位成本可能为上一周的单位成本加上储存费,也可能为该周的单位成本。 1 #pragma comment(lin... 阅读全文
posted @ 2015-11-07 13:56 UniqueColor 阅读(240) 评论(0) 推荐(0) 编辑
摘要:题意:类似cf的赛制,每道题目有A,B,C三个值,A表示初始分数,B表示每分钟题的分数会减少B,C表示做这道题需要C分钟,数据保证分数不会变为负数。现在给出比赛时长,问安排做题的顺序,求最大得分。思路:这道题是一道非常经典的题。首先很容易想到一件事,给出的题哪个先做没有先后顺序,那么在动态规划的时候... 阅读全文
posted @ 2015-10-17 14:43 UniqueColor 阅读(314) 评论(0) 推荐(1) 编辑
摘要:DescriptionThe clique problem is one of the most well-known NP-complete problems. Under some simplification it can be formulated as follows. Consider ... 阅读全文
posted @ 2015-10-12 16:31 UniqueColor 阅读(349) 评论(0) 推荐(0) 编辑
摘要:DescriptionDrazil created a following problem about putting 1 × 2 tiles into an n × m grid:"There is a grid with some cells that are empty and some ce... 阅读全文
posted @ 2015-09-25 19:54 UniqueColor 阅读(301) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionClarke is a patient with multiple personality disorder. One day, Clarke turned into a game player of minecraft. On that day, Clarke... 阅读全文
posted @ 2015-09-22 19:55 UniqueColor 阅读(213) 评论(0) 推荐(0) 编辑
摘要:DescriptionBessie noted that although humans have many universities they can attend, cows have none. To remedy this problem, she and her fellow cows f... 阅读全文
posted @ 2015-08-30 20:17 UniqueColor 阅读(288) 评论(0) 推荐(0) 编辑
摘要:DescriptionTo avoid unsightly burns while tanning, each of the C (1 ≤ C ≤ 2500) cows must cover her hide with sunscreen when they're at the beach. Cow... 阅读全文
posted @ 2015-08-29 00:28 UniqueColor 阅读(481) 评论(0) 推荐(0) 编辑
摘要:DescriptionOh those picky N (1 >>>>>>>>>>>>>>>>>>>>>>>>>>Stall 2 .. c2>>>>>> c4>>>>>>>>> .. ..Stall 3 .. .. c3>>>>>>>>> .. .. .. ..Stall 4 .. .. .. c5 阅读全文
posted @ 2015-08-27 20:38 UniqueColor 阅读(165) 评论(0) 推荐(0) 编辑
摘要:DescriptionAssume 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 ... 阅读全文
posted @ 2015-08-27 01:34 UniqueColor 阅读(235) 评论(0) 推荐(0) 编辑
摘要:DescriptionFarmer John is assigning some of his N (1 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 #define N 26000 8 struct No... 阅读全文
posted @ 2015-08-27 00:00 UniqueColor 阅读(228) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示