状态压缩dp
WA_automation
这个作者很懒,什么都没留下…
展开
-
poj 3254 状态压缩dp
https://www.cnblogs.com/ibilllee/p/7651971.html照着这篇博客学的#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;const int mod=100000...原创 2019-01-10 16:55:10 · 75 阅读 · 0 评论 -
poj1185 状态压缩dp
#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;int N,M,P;int dp[105][80][80];int st[80],sum[80],tot,mp[105];bool check(int x...原创 2019-01-10 19:44:46 · 109 阅读 · 0 评论 -
P1879
https://www.luogu.org/problemnew/show/P1879#include <bits/stdc++.h>using namespace std;const int mod=1e8;int mp[15],N,M,x;int st[1050],tot;int dp[15][1050];int main(){ cin>>N&...原创 2019-01-11 15:55:31 · 239 阅读 · 0 评论 -
P1896
#include <bits/stdc++.h>using namespace std;typedef long long LL;LL N,K;LL st[600],tot;LL dp[10][600][100];//i行状态为j已经摆放了k个棋子的方案数LL sum(LL x){ LL ans=0; for(LL i=0; i<N; i++)if(...原创 2019-01-11 16:42:19 · 135 阅读 · 0 评论