上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 72 下一页
摘要: http://poj.org/problem?id=2528 Description The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have bee 阅读全文
posted @ 2014-09-01 21:27 人艰不拆_zmc 阅读(261) 评论(0) 推荐(0) 编辑
摘要: http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2806 名字的价值 题目描述 每 个人都有名字,名字都是唯一的不存在重复现象。现在假设名字都是由小写字母组成并且长度不超过10,我们赋予每个名字一个初始价值 阅读全文
posted @ 2014-08-28 20:53 人艰不拆_zmc 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 1、 线段树是二叉树,且必定是平衡二叉树,但不一定是完全二叉树。 2、 对于区间[a,b],令mid=(a+b)/2,则其左子树为[a,mid],右子树为[mid+1,b],当a==b时,该区间为线段树的叶子,无需继续往下划分。 3、 线段树虽然不是完全二叉树,但是可以用完全二叉树的方式去构造并存储 阅读全文
posted @ 2014-08-28 10:28 人艰不拆_zmc 阅读(2820) 评论(0) 推荐(4) 编辑
摘要: http://poj.org/problem?id=3169 题意: 一堆牛在一条直线上按编号站队,在同一位置可以有多头牛并列站在一起,但编号小的牛所占的位置不能超过编号大的牛所占的位置,这里用d[i]表示编 号为i的牛所处的位置,即要满足d[i]-d[i+1]<=0,同时每两头牛之间有以下两种关系 阅读全文
posted @ 2014-08-28 09:18 人艰不拆_zmc 阅读(324) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1712 分组背包 问题 有N件物品和一个容量为V的背包。第i件物品的费用是c[i],价值是w[i]。这些物品被划分为若干组,每组中的物品互相冲突,最多选一件。求解将哪些物品装入背包可使这些物品的费用总和不超过背包容 阅读全文
posted @ 2014-08-27 20:46 人艰不拆_zmc 阅读(719) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1203 Problem Description Speakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可 阅读全文
posted @ 2014-08-27 20:30 人艰不拆_zmc 阅读(241) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1171 题意:给出每个物体的价值和物体的数量,如何分使得A,B所得价值最接近并且A的价值不能小于B 思路:将总和平分后,就是一道多重背包题了 阅读全文
posted @ 2014-08-27 20:19 人艰不拆_zmc 阅读(225) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1014 Description Marsha and Bill own a collection of marbles. They want to split the collection among themselves so that bot 阅读全文
posted @ 2014-08-27 20:12 人艰不拆_zmc 阅读(294) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2191 Problem Description 急!灾区的食物依然短缺!为了挽救灾区同胞的生命,心系灾区同胞的你准备自己采购一些粮食支援灾区,现在假设你一共有资金n元,而市场有m种大米,每种大米都是袋装产品,其价格 阅读全文
posted @ 2014-08-27 20:05 人艰不拆_zmc 阅读(341) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2159 各种背包五(二维费用背包问题) 问题 二维费用的背包问题是指:对于每件物品,具有两种不 同的费用;选择这件物品必须同时付出这两种代价;对于每种代价都有一个可付出的最大值(背包容量)。问怎样选择物品可以得到最 阅读全文
posted @ 2014-08-26 21:14 人艰不拆_zmc 阅读(348) 评论(0) 推荐(0) 编辑
摘要: http://acm.sdut.edu.cn:8080/vjudge/contest/view.action?cid=267#problem/A A - Intervals Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & 阅读全文
posted @ 2014-08-23 16:06 人艰不拆_zmc 阅读(207) 评论(0) 推荐(0) 编辑
摘要: http://acm.sdut.edu.cn:8080/vjudge/contest/view.action?cid=267#problem/C C - Candies Time Limit:1500MS Memory Limit:131072KB 64bit IO Format:%I64d & % 阅读全文
posted @ 2014-08-23 16:01 人艰不拆_zmc 阅读(188) 评论(0) 推荐(0) 编辑
摘要: http://acm.sdut.edu.cn:8080/vjudge/contest/view.action?cid=267#problem/B B - Is the Information Reliable? Time Limit:3000MS Memory Limit:131072KB 64bi 阅读全文
posted @ 2014-08-23 15:45 人艰不拆_zmc 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 差分约束系统有两种方式可以求解,最短路和最长路。当我们把不等式整理成d[a]+w<=d[b]时,我们求最长路。整理成d[a]+w>=d[b]时,我们求最短路。当求最短路时,我们通常要把各点距离初始化为正无穷,求最短路,把各点距离逐渐减小,直到符合所有不等式。也就是开始 各点不符合条件,后来通过减小变 阅读全文
posted @ 2014-08-22 14:37 人艰不拆_zmc 阅读(9594) 评论(1) 推荐(6) 编辑
摘要: http://acm.sdut.edu.cn:8080/vjudge/contest/view.action?cid=259#problem/H Description Since 1945, when the first nuclear bomb was exploded by the Manha 阅读全文
posted @ 2014-08-20 16:12 人艰不拆_zmc 阅读(357) 评论(0) 推荐(0) 编辑
上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 72 下一页