随笔分类 -  dp

摘要:AVL Trees 题目连接: (http://codeforces.com/gym/100341) 题意 avl树是每棵子树的左右子树高度之差小于等于1,给你节点个数和树高,问有多少种树 题解: 很轻松地我们写出dp: dp[h][n]表示树高h+1,n个节点的答案 $dp[h][n]=\sum_ 阅读全文
posted @ 2016-08-24 20:53 femsub 阅读(385) 评论(0) 推荐(0)
摘要:Ant Man 题目连接: (http://codeforces.com/contest/704/problem/B) Description Scott Lang is at war with Darren Cross. There are n chairs in a hall where the 阅读全文
posted @ 2016-08-08 19:35 femsub 阅读(396) 评论(0) 推荐(0)
摘要:Maze Mayhem 题目连接: (https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4926) 题意 n m的格子,给你一个k,表示你最多可 阅读全文
posted @ 2016-08-03 21:08 femsub 阅读(246) 评论(0) 推荐(0)
摘要:Filling 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5766 Description The board is a rectangle of unit cells with N rows and N columns. At first, c 阅读全文
posted @ 2016-07-31 00:51 femsub 阅读(641) 评论(0) 推荐(0)