摘要: 问题给出n个木头, 每个木有有li , wi的属性, 如果后一根木头的li>=li-1 且wi>=w-1 那么不需要等加工时间, 否则加1.第一根木头总要1个时间的加工时间,问最少需要多少时间首先根据木头的某一个属性排序, 然后求 最长下降子序列( 等于求出最长不下降的 个数) 题目:Wooden SticksTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 17044Accepted: 7121DescriptionThere is a pile of n wooden sticks. The length and 阅读全文
posted @ 2014-02-05 22:52 doubleshik 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 奶牛们上天了。。 有n种材料,每种材料高hi , 限制最大放置高度ai , 有ci块, 问能搭多高首先对每种材料按照ai排序, 然后从小到大, dp[i][j] 表示前i中材料在j的高度下,第i种能剩多少,最后只要从amax往下判断第一个>=0的就可以了题目:Space ElevatorTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 7638Accepted: 3606DescriptionThe cows are going to space! They plan to achieve orbit by building 阅读全文
posted @ 2014-02-05 20:46 doubleshik 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 与昨天一道类似的多重集组合数问题每个家族有n个蚂蚁,一共T个家族, 问从S到B能有多少组合可能题目:G - Ant Counting Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit StatusAppoint description:DescriptionBessie was poking around the ant hill one day watching the ants march to and fro while gathering food. She realized 阅读全文
posted @ 2014-02-05 19:25 doubleshik 阅读(638) 评论(0) 推荐(0) 编辑
摘要: 一个背包问题给出n只奶牛的IQ ,EQ 要求在IQ EQ 都不小于0 的情况下总和最大dp[i][q] 表示前i只奶牛智商总和为q的最大情商。对每一只奶牛枚举一下智商的范围, 从-1000*100 ~ 1000*100 用数组平移一下 就是0 ~2*1000*100初始化dp[0]= 0 表示在不装任何奶牛的情况下智商和0,情商和0要求每次必须正好装满智商题目:Cow ExhibitionTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 8292Accepted: 3059Description"Fat and doci 阅读全文
posted @ 2014-02-05 17:17 doubleshik 阅读(217) 评论(0) 推荐(0) 编辑