贪心
文章平均质量分 70
贪心
JSASL
这个作者很懒,什么都没留下…
展开
-
POJ 3262 Protecting the Flowers(贪心)
Farmer John went to cut some wood and left N (2 ≤ N ≤ 100,000) cows eating the grass, as usual. When he returned, he found to his horror that the cluster of cows was in his garden eating his beautiful flowers. Wanting to minimize the subsequent damage, FJ原创 2021-02-20 20:17:57 · 367 阅读 · 0 评论 -
#10003. 「一本通 1.1 例 4」加工生产调度
加工生产调度 题目描述 某工厂收到了n个产品的订单,这n个产品分别在A、B两个车间加工,并且必须先在A车间加工后才可以到B车间加工。 某个产品i在A、B两车间加工的时间分别为Ai、Bi。询问怎样安排这n个产品的加工顺序,才能使总的加工时间最短。这里所说的加工时间是指:从开始加工第一个产品到最后所有的产品都已在A、B两车间加工完毕的时间。 输入格式: 第一行仅—个数据n(0<n<1000),表示产品的数量。 接下来n个数据是...原创 2020-10-29 20:35:17 · 467 阅读 · 0 评论 -
POJ 3253 Fence Repair(贪心,优先队列)
Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some integer length Li (1 ≤ Li ...原创 2020-03-26 22:02:27 · 308 阅读 · 0 评论 -
Best Cow Line(贪心)
FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges his cows in a line and herds them past the judges. The contest organ...原创 2020-03-26 21:51:47 · 194 阅读 · 0 评论