![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
动态规划
文章平均质量分 70
不懂规矩
过好自己,不悔~~
展开
-
hdu 1565
题意:给你n*n个数,要你取不相邻的数,取得一个最大值。 状态压缩DP。。 #include #include #include using namespace std; const int M=1<<20; int num,n,Max; int state[100000];//存所有的状态 int map[25][25]; int dp[2][100000];//循环原创 2013-10-06 13:30:21 · 595 阅读 · 0 评论 -
hdu 4248 A Famous Stone Collector
题目大意:给n堆不同颜色的石头,给定每堆石头的数量,问,能够组成多少串满足: Two patterns are considered different, if and only if they have different number of stones or have different colors on at least one position. dp[i][k]指前i堆石原创 2013-10-23 21:06:52 · 486 阅读 · 0 评论