随笔分类 -  DP

2014 ACM/ICPC Asia Regional Xi'an Online Paint Pearls
摘要:传说的SB DP:题目Problem DescriptionLee has a string of n pearls. In the beginning, all the pearls have no color. He plans to color the pearls to make it mo... 阅读全文

posted @ 2014-09-17 14:55 forgot93 阅读(186) 评论(0) 推荐(0)

数位DP之小小结
摘要:资料链接:http://wenku.baidu.com/view/9de41d51168884868662d623.html http://wenku.baidu.com/view/d2414ffe04a1b0717fd5dda8.html几位大大的数位BLOG:http://www.cn... 阅读全文

posted @ 2014-08-04 13:25 forgot93 阅读(267) 评论(0) 推荐(0)

Codeforces Round #259 (Div. 2)-D. Little Pony and Harmony Chest
摘要:题目范围给的很小,所以有状压的方向。我们是构造出一个数列,且数列中每两个数的最大公约数为1;给的A[I]#include#include#include#define inf 0x3f3f3f3fusing namespace std;int cnt=0;int c[123],a[123];int ... 阅读全文

posted @ 2014-08-02 20:21 forgot93 阅读(182) 评论(0) 推荐(0)

状态压缩DP
摘要:1:POJ炮兵阵地 预先处理好情况,然后又类似格子取数的状压。我们用DP[I][J][K]表示处理第I个格子,I-1格子的状态为J,I-2的格子为K,然后转移1#include2#include3#include4#include5#include6usingnamespacestd;7chars[... 阅读全文

posted @ 2014-07-26 02:04 forgot93 阅读(202) 评论(0) 推荐(0)

TJU 4087. box
摘要:题目:Tuhao and his two small partners participated in the tournament.But in the end, they lost the chance to finish a mathematical problem.After the com... 阅读全文

posted @ 2014-06-24 14:43 forgot93 阅读(151) 评论(0) 推荐(0)

概率DP
摘要:浅析竞赛中一类数学期望问题的解决方法http://acm.hdu.edu.cn/showproblem.php?pid=3853HDU 3853本题题解网上太多了,所以就不需要再多说什么了。说说怎么求期望吧!假如一直(I,J)的期望那么DP[I][J+1]的期望从DP[I][J]上得到的是DP[I]... 阅读全文

posted @ 2014-06-23 14:59 forgot93 阅读(237) 评论(0) 推荐(0)

导航