上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 63 下一页
摘要: //f[i][j]表示从(i,j)开始滑的路径 #include <cstring> #include <iostream> #include <algorithm> using namespace std; const int N = 310; int n, m; int g[N][N]; int 阅读全文
posted @ 2019-11-21 16:13 晴屿 阅读(77) 评论(0) 推荐(0)
摘要: //f[u][0]是所有以u为根的子树中选择,并且不选u这个点的方案 //f[u][1]是所有以u为根的子树中选择,并且 选u这个点的方案 #include <cstring> #include <iostream> #include <algorithm> using namespace std; 阅读全文
posted @ 2019-11-21 16:12 晴屿 阅读(102) 评论(0) 推荐(0)
摘要: //f[i][j]表示从0走到j,走过的所有点是i(一个二进制数)的所有路径 #include <cstring> #include <iostream> #include <algorithm> using namespace std; const int N = 20, M = 1 << N; 阅读全文
posted @ 2019-11-21 16:11 晴屿 阅读(111) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h> using namespace std; const int N = 12, M = 1 << N; int st[M]; long long f[N][M]; //用f[i][j]记录第i列第j个状态。j状态位等于1表示上一列有横放格子,本列有格子捅 阅读全文
posted @ 2019-11-21 16:11 晴屿 阅读(111) 评论(0) 推荐(0)
摘要: #include <iostream> #include <algorithm> using namespace std; const int N = 1010, mod = 1e9 + 7; int n; int f[N][N]; int main() { cin >> n; f[0][0]=1; 阅读全文
posted @ 2019-11-20 01:05 晴屿 阅读(101) 评论(0) 推荐(0)
摘要: //不考虑数字的顺序 //可以看出完全背包问题,1~ n-1 的数字可以用无限次 #include <iostream> #include <algorithm> using namespace std; const int N = 1010, mod = 1e9 + 7; int n; int f 阅读全文
posted @ 2019-11-20 01:03 晴屿 阅读(146) 评论(0) 推荐(0)
摘要: #include <iostream> #include <algorithm> #include <string.h> using namespace std; const int N = 15, M = 1010; int n, m; int f[N][N]; char str[M][N]; i 阅读全文
posted @ 2019-11-20 01:02 晴屿 阅读(134) 评论(0) 推荐(0)
摘要: #include <iostream> #include <algorithm> using namespace std; const int N = 1010; int n, m; char a[N], b[N]; int f[N][N];//a的前N个去匹配b的前N个需要编辑的最小操作 int 阅读全文
posted @ 2019-11-20 01:02 晴屿 阅读(131) 评论(0) 推荐(0)
摘要: #include<iostream> #include<algorithm> #include<vector> using namespace std; int main(void) { int n; cin >> n; vector<int>arr(n); for (int i = 0; i < 阅读全文
posted @ 2019-11-20 01:01 晴屿 阅读(183) 评论(0) 推荐(0)
摘要: 石子合并终极通用版 #include<bits/stdc++.h> using namespace std ; int stone[50010]; int n,t,ans; void combine(int k) { int tem=stone[k]+stone[k-1];//合并k和k-1堆 an 阅读全文
posted @ 2019-11-20 01:00 晴屿 阅读(247) 评论(0) 推荐(0)
上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 63 下一页