dp
文章平均质量分 65
信天翁_
这个作者很懒,什么都没留下…
展开
-
Gym - 100989B
题目描述:Although Haneen was able to solve the LCS problem, Dr. Ibrahim is suspicious about whether she really understands the LCS problem or not. He believes that she can't write the code on her own...原创 2018-07-17 09:52:06 · 224 阅读 · 0 评论 -
SPOJ - AMR11A
Thanks a lot for helping Harry Potter in finding the Sorcerer's Stone of Immortality in October. Did we not tell you that it was just an online game ? uhhh! now here is the real onsite task for Harry....原创 2018-07-30 16:08:53 · 185 阅读 · 0 评论 -
路径数量 dp 思维题
链接:https://www.nowcoder.com/acm/contest/185/B 来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/...原创 2018-09-13 21:02:54 · 303 阅读 · 0 评论 -
分层图最短路初学
题目链接:https://www.lydsy.com/JudgeOnline/problem.php?id=2763中文题不解释题意了思路:我们设置dis[i][k]表示走到第i号点,免费经过了k条边的最短路。对于我们当前找到的终点,尝试起点的状态去更新,不选择此条边免费的状态和选择此条边免费的状态,再将这两个状态压入队列去更新可以到达的其他状态。代码(原oj好像不能注册就没有再注册...原创 2018-12-06 18:48:01 · 228 阅读 · 0 评论 -
(n的m划分) 划分dp poj1664
放苹果Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 40021 Accepted: 24456 Description把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。Input第一行是测...原创 2019-07-11 19:41:23 · 172 阅读 · 0 评论 -
poj3659( 树形dp )
参考博客:https://blog.csdn.net/jiang199235jiangjj/article/details/7878473动态规划的思路: 根据题意知道每个节点有三种状态: 1、点i建塔,i的所有孩子都覆盖,用dp[i][0]表示; 2、点i不建塔,i和i的所有孩子都覆盖,用dp[i][1]表示; ...原创 2019-09-05 20:46:59 · 117 阅读 · 0 评论