05 2019 档案
动态规划——LCS 最大子数组问题
摘要:源代码: #include <stdio.h> #include <iostream> using namespace std; int const N = 100; int x[N] = { NULL,1,2,3,2,4,1,2 }; int y[N] = { NULL,2,4,3,1,2,1 } 阅读全文
posted @ 2019-05-23 00:04 huwenao 阅读(219) 评论(0) 推荐(0)
算法导论——动态规划——矩阵链乘法
摘要:给定n个矩阵A[n],其中A[i]的维数用数组MATRIX[i]×MATRIX[i+1]表示,记为数组MATRIX[n+1]。 源代码: #include<stdio.h> #include<stdlib.h> #include<iostream> using namespace std; int 阅读全文
posted @ 2019-05-22 20:47 huwenao 阅读(221) 评论(0) 推荐(0)
算法导论——求最大子数组问题
摘要:利用分治算法求最大子数组问题 #include<iostream> #include<stdio.h> #define _CRT_SECURE_NO_WARNINGS #pragma warning(disable:4996) int const N = 100; using namespace s 阅读全文
posted @ 2019-05-21 19:30 huwenao 阅读(252) 评论(1) 推荐(0)