![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
贪心
至此曾经
从未坚持?
展开
-
uva 11636/Hello World!
When you first made the computer to print the sentence “Hello World!”, you felt so happy, notknowing how complex and interesting the world of programming and algorithm will turn out to be.Then you原创 2016-10-08 00:39:52 · 256 阅读 · 0 评论 -
uva 11491/Erasing and Winning
Juliano is a fan of the TV show Erasing and Winning, where participants are selected in a draw andreceive money for taking part in the show.In the show, the presenter writes a number of N digits i原创 2016-10-07 21:48:39 · 351 阅读 · 0 评论 -
uva 1149/Bin Packing
A set of n 1-dimensional items have to be packed in identical bins. All bins have exactly the samelength l and each item i has length li ≤ l. We look for a minimal number of bins q such that• each原创 2016-10-07 21:01:22 · 297 阅读 · 0 评论 -
51nod 1621 花钱买车牌 (贪心)
一个车牌号由n位数字组成。如果一个车牌至少有k位数字是相同的,那么我们就说这个车牌漂亮的车牌。现在华沙想要改变他自己的车牌,使得他的车牌变得漂亮。当然,改车牌是要花钱的。每改变一位数字所要花费的费用等于当前位上的新旧数字之差的绝对值。那么总费用就是每位上所花费用的总和。举例如下,旧牌为0123,新牌为7765,那么对应第一位所花费用为|0-7|=7,第二位为|1-7|=6,第三位为原创 2017-10-16 11:37:22 · 874 阅读 · 0 评论