
贪心算法
xiao1guaishou
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
PAT A1038
题目: Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given { 32, 321, 3214, 0229, 87 }, we can recover many numbers such like 32-321-3214...原创 2019-04-04 15:29:08 · 411 阅读 · 1 评论 -
PAT A1067
题目: 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...原创 2019-04-04 17:36:19 · 490 阅读 · 1 评论 -
PAT A1033
题目: 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. Differe...原创 2019-04-05 11:53:08 · 359 阅读 · 0 评论 -
PAT A1037
题目: 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 prod...原创 2019-04-03 16:39:26 · 150 阅读 · 0 评论