上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 63 下一页
摘要: #include <iostream> #include <algorithm> using namespace std; const int N = 310; int n; int s[N];//前缀和 int f[N][N];//状态 int main() { scanf("%d", &n); 阅读全文
posted @ 2019-11-19 02:16 晴屿 阅读(113) 评论(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]; int main() { scanf("%d%d", & 阅读全文
posted @ 2019-11-19 02:15 晴屿 阅读(109) 评论(0) 推荐(0)
摘要: //设上升序列的最后一个数字为第i个,那么就以第i-1个位分类标准, //i-1可以没有,也可以是在数组中下标为1,下标为2 //一直到下标为i-1的数字 #include <iostream> #include <algorithm> using namespace std; const int 阅读全文
posted @ 2019-11-19 02:15 晴屿 阅读(99) 评论(0) 推荐(0)
摘要: //从上往下 #include <iostream> #include <algorithm> using namespace std; const int N = 510, INF = 1e9; int n; int a[N][N]; int f[N][N]; int main() { scanf 阅读全文
posted @ 2019-11-19 02:14 晴屿 阅读(140) 评论(0) 推荐(0)
摘要: #include<iostream> #include<algorithm> #include<cstring> using namespace std ; const int N=110; int n,v,m; int f[N][N]; int main() { cin>>n>>v>>m; for 阅读全文
posted @ 2019-11-17 21:00 晴屿 阅读(131) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h> using namespace std ; const int N=1010; int n,m; int f[N]; struct Thing { int kind;//记录背包种类 int v,w; }; vector<Thing>things; i 阅读全文
posted @ 2019-11-17 20:59 晴屿 阅读(150) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-11-16 20:17 晴屿 阅读(97) 评论(0) 推荐(0)
摘要: #include <iostream> #include <algorithm> using namespace std; const int N = 110; int n, m; int v[N][N], w[N][N], s[N]; int f[N]; int main() { cin >> n 阅读全文
posted @ 2019-11-16 20:03 晴屿 阅读(125) 评论(0) 推荐(0)
摘要: //二进制优化 最后变为01背包 #include <iostream> #include <algorithm> using namespace std; const int N = 12010, M = 2010; int n, m; int v[N], w[N]; int f[M]; int 阅读全文
posted @ 2019-11-16 20:02 晴屿 阅读(157) 评论(0) 推荐(0)
摘要: 朴素 #include<iostream> #include<algorithm> using namespace std ; const int N=1010; int n,m; int v[N],w[N]; int f[N][N]; int main() { cin>>n>>m;//n个物品 最 阅读全文
posted @ 2019-11-16 20:01 晴屿 阅读(172) 评论(0) 推荐(0)
上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 63 下一页