![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
贪心
小雪乃
这个作者很懒,什么都没留下…
展开
-
PAT 甲级 1033. To Fill or Not to Fill (25)
With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas stations on the way from time to time. Different ga原创 2017-09-24 15:47:44 · 197 阅读 · 0 评论 -
PAT 甲级 1037. Magic Coupon (25)
The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a product, you may get N times the value of that product b原创 2017-09-25 16:42:33 · 127 阅读 · 0 评论 -
PAT 甲级 1067. Sort with Swap(0,*) (25)
Given any permutation of the numbers {0, 1, 2,..., N-1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operation that is allowed to use? For example, to sort {4, 0, 2原创 2017-10-02 09:58:38 · 156 阅读 · 0 评论 -
PAT 甲级 1070. Mooncake (25)
Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in traditional mooncakes according to the region's culture. Now原创 2017-10-02 16:45:22 · 208 阅读 · 0 评论 -
蓝桥杯 算法提高 快乐司机
问题描述 “嘟嘟嘟嘟嘟嘟 喇叭响 我是汽车小司机 我是小司机 我为祖国运输忙 运输忙” 这是儿歌“快乐的小司机”。话说现在当司机光有红心不行,还要多拉快跑。多拉不是超载,是要让所载货物价值最大,特别是在当前油价日新月异的时候。司机所拉货物为散货,如大米、面粉、沙石、泥土…… 现在知道了汽车核载重量为w,可供选择的物品的数量n。每个物品的重量为gi,价值原创 2017-12-18 19:55:40 · 191 阅读 · 0 评论