摘要: We have a sequence of N positive integers: a[0] through a[N-1]. You do not know these integers. All you know is the number of trailing zeros in their ... 阅读全文
posted @ 2014-09-05 21:36 水门 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 题目链接题意:给一颗树,用最少的点覆盖整棵树。每一个结点可以防守相邻的一个边,求最少的点防守所有的边。分析:1:以当前节点为根节点,在该节点排士兵守护道路的最小消耗。在这种情况下,他的子节点可以安排士兵,也可以不安排士兵。可以从各个子节点两个不同状态(存在士兵,不存在士兵)的最值中选出最小的消耗,然... 阅读全文
posted @ 2014-09-05 21:31 水门 阅读(155) 评论(0) 推荐(0) 编辑