2013年5月17日

摘要: 欢迎留下你的见解 ^-^ ~~#include <algorithm>#include <iostream>#include <cstdlib>#include <cstring>#include <cstdio>#include <queue>using namespace std;const int maxn=12+5;const int maxm=12+5;int n,m,tot;int state[380],stanum[380];int in[maxm];bool flg[maxn];//char s[maxn] 阅读全文
posted @ 2013-05-17 18:04 Raining Days 阅读(158) 评论(0) 推荐(0)
摘要: 突然想到这么一个词语,觉得很重要。 最近在看状态压缩dp,因为不会状压,所以还找了那个ppt去看,外面又百度看了几篇博客,感受一下那个写法。我自己第一道状态压缩dp,之前自己写的深搜是这种的:void dfs(int cur,int st,int count){ if(cur==m) { state[tot]=st; stanum[tot++]=count; return; } flg[cur+1]=0; dfs(cur+1,st<<1,count); if(flg[cur-1]+flg[cur]==0) ... 阅读全文
posted @ 2013-05-17 16:15 Raining Days 阅读(192) 评论(0) 推荐(0)

导航