摘要: 由搜索过渡到dp的方法就是将考察的对象由搜索的单层转变为当前层之前所有层构成的整体。/* ID:chenjiong PROG:subset LANG:C++*/#include <stdio.h>#include <string.h>const int MAXN = 40;int N;int dp[MAXN][MAXN * MAXN];int sum;void solve(){ int i,j; dp[1][1] = 1; dp[1][0] = 1; for ( i = 2; i <= N; i++) { for ( j = 0; ... 阅读全文
posted @ 2012-11-12 23:04 Sinker 阅读(130) 评论(0) 推荐(0) 编辑