随笔分类 -  1-2-动态规划-背包DP

摘要:Partial Tree In mathematics, and more specifically in graph theory, a tree is an undirected graph in which any two nodes are connected by exactly one 阅读全文
posted @ 2018-10-01 19:29 yzm10 阅读(243) 评论(0) 推荐(0)
摘要:Transport Ship 25.78% 1000ms 65536K There are NN different kinds of transport ships on the port. The i^{th}ith kind of ship can carry the weight of V[ 阅读全文
posted @ 2018-09-15 18:04 yzm10 阅读(354) 评论(0) 推荐(0)
摘要:Outing Input Output Sample Input Sample Output for 所有的组k for v=V..0 for 所有的i属于组k f[v]=max{f[v],f[v-c[i]]+w[i]} 有一辆能载客m的车,有n个人,然后第i个人上车的条件是第a[i]个人要上车,问 阅读全文
posted @ 2018-08-28 17:29 yzm10 阅读(285) 评论(0) 推荐(0)
摘要:Herbs Gathering 10.76% 1000ms 32768K Collecting one's own plants for use as herbal medicines is perhaps one of the most self-empowering things a perso 阅读全文
posted @ 2018-08-14 19:36 yzm10 阅读(182) 评论(0) 推荐(0)
摘要:PACM Team 链接:https://www.nowcoder.com/acm/contest/141/A来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K Special Judge, 64bit IO Format: %lld 阅读全文
posted @ 2018-07-26 20:35 yzm10 阅读(395) 评论(0) 推荐(0)
摘要:度度熊与邪恶大魔王 度度熊为了拯救可爱的公主,于是与邪恶大魔王战斗起来。 邪恶大魔王的麾下有n个怪兽,每个怪兽有a[i]的生命值,以及b[i]的防御力。 度度熊一共拥有m种攻击方式,第i种攻击方式,需要消耗k[i]的晶石,造成p[i]点伤害。 当然,如果度度熊使用第i个技能打在第j个怪兽上面的话,会 阅读全文
posted @ 2018-07-19 18:28 yzm10 阅读(241) 评论(0) 推荐(0)
摘要:Knapsack problem Given a set of n items, each with a weight w[i] and a value v[i], determine a way to choose the items into a knapsack so that the tot 阅读全文
posted @ 2018-04-16 23:40 yzm10 阅读(203) 评论(0) 推荐(0)
摘要:L3-001. 凑零钱 时间限制 200 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 时间限制 200 ms 时间限制 200 ms 内存限制 65536 kB 内存限制 65536 kB 代码长度限制 8000 B 代码长度限制 8000 阅读全文
posted @ 2018-03-24 21:16 yzm10 阅读(321) 评论(0) 推荐(0)
摘要:Piggy-Bank Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes f 阅读全文
posted @ 2017-08-17 22:31 yzm10 阅读(519) 评论(0) 推荐(1)
摘要:ycb的ACM进阶之路 发布时间: 2017年5月22日 14:30 最后更新: 2017年5月22日 14:31 时间限制: 1000ms 内存限制: 128M 描述 ycb是个天资聪颖的孩子,他的梦想是成为世界上最伟大的ACMer。为此,他想拜附近最有威望的dalao为师。dalao为了判断他的 阅读全文
posted @ 2017-08-15 23:34 yzm10 阅读(291) 评论(0) 推荐(0)
摘要:B - Big Event in HDU Nowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College had 阅读全文
posted @ 2017-08-14 12:58 yzm10 阅读(404) 评论(0) 推荐(1)
摘要:饭卡 问题描述 : 问题描述 : 电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜可购买 阅读全文
posted @ 2017-08-14 10:54 yzm10 阅读(127) 评论(0) 推荐(0)
摘要:分辣条 发布时间: 2016年6月26日 20:36 最后更新: 2016年6月26日 20:37 时间限制: 1000ms 内存限制: 128M 描述 “你喝的酸奶是我买的,辣条也是我买的,你现在要跟我分手,你把我当什么?” “因为你每次分辣条的时候都比我多一根!” 可见分好辣条是一件多么重要的事 阅读全文
posted @ 2017-07-19 00:24 yzm10 阅读(384) 评论(0) 推荐(0)
摘要:背包之01背包、完全背包、多重背包详解 PS:大家觉得写得还过得去,就帮我顶博客,谢谢。 首先说下动态规划,动态规划这东西就和递归一样,只能找局部关系,若想全部列出来,是很难的,比如汉诺塔。你可以说先把除最后一层的其他所有层都移动到2,再把最后一层移动到3,最后再把其余的从2移动到3,这是一个直观的 阅读全文
posted @ 2017-07-13 19:18 yzm10 阅读(424) 评论(0) 推荐(0)