上一页 1 ··· 5 6 7 8 9 10 11 下一页
摘要: "采药" 01背包模板题。 阅读全文
posted @ 2019-05-09 20:55 Mystery_Sky 阅读(201) 评论(0) 推荐(0) 编辑
摘要: "01背包问题" 经典的01背包问题模板 这里提供两种做法: 阅读全文
posted @ 2019-05-09 20:53 Mystery_Sky 阅读(1070) 评论(0) 推荐(0) 编辑
摘要: "最长公共子序列" cpp include include include using namespace std; //Mystery_Sky // define M 1000 string s1, s2; int len1, len2; int f[M][M], ans; int main() 阅读全文
posted @ 2019-05-09 20:51 Mystery_Sky 阅读(521) 评论(0) 推荐(0) 编辑
摘要: "最大子矩阵" 无脑操作题,由于n include using namespace std; //Mystery_Sky // define M 1000 int f[M][M], a[M][M]; int n, ans, maxn; int main() { scanf("%d", &n); fo 阅读全文
posted @ 2019-05-09 19:56 Mystery_Sky 阅读(643) 评论(1) 推荐(1) 编辑
摘要: "最大上升子序列和" "最长上升子序列" 的变式。 状态转移方程: if(ai aj) fi = max(fi, fj+ai) cpp include include using namespace std; //Mystery_Sky // define M 1010 int maxn, n; i 阅读全文
posted @ 2019-05-09 19:39 Mystery_Sky 阅读(411) 评论(0) 推荐(0) 编辑
摘要: "摘花生" 思路与 "最低通行费" 相似 cpp include include include include using namespace std; //Mystery_Sky // define M 1010 int a[M][M], f[M][M]; int t, n, m; int ma 阅读全文
posted @ 2019-05-05 21:25 Mystery_Sky 阅读(277) 评论(0) 推荐(0) 编辑
摘要: "登山" 与 "合唱队形" 只差输出方式,难度较低。 阅读全文
posted @ 2019-05-05 21:17 Mystery_Sky 阅读(539) 评论(0) 推荐(0) 编辑
摘要: "合唱队形" 对于每个点,找到以这个点为终点的最长上升序列长度以及以这个点为起点的最长下降序列长度,找到二者之和最大的点,然后用总人数减去该点二者之和即可。 阅读全文
posted @ 2019-05-05 21:14 Mystery_Sky 阅读(683) 评论(0) 推荐(0) 编辑
摘要: "机器人搬重物" 坑点极多的一道bfs好题! cpp include include include include include using namespace std; //Mystery_Sky // define INF 0x3f3f3f3f const int M = 100; stru 阅读全文
posted @ 2019-05-05 20:32 Mystery_Sky 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 题目链接 简单的floyd+剧毒的输入 阅读全文
posted @ 2019-05-01 21:48 Mystery_Sky 阅读(69) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 下一页