摘要: #pragma once #include "stdafx.h" #define MAXK 1e7 //class AlgoMath { //public: // AlgoMath() {} // virtual ~AlgoMath() {} //}; //级数求和 //伪 lanmda 写法 //double Series=(double base, int limit, int Cons... 阅读全文
posted @ 2017-03-22 23:18 影落明湖 阅读(288) 评论(0) 推荐(0) 编辑
摘要: //最大子列和 //动态规划 //算法4 在线处理,T(N)=O(N) //在线的意思是指每输入一个数据就进行即时处理,在任何一个地方中止输入,算法都能正确给出当前的解 int MaxSubsequSum4(int A[], int length) { int ThisSum, MaxSum; int i; ThisSum = MaxSum = 0; for (i = 0; i Max... 阅读全文
posted @ 2017-03-22 23:14 影落明湖 阅读(421) 评论(0) 推荐(0) 编辑
摘要: #pragma once #include "stdafx.h" //用vector实现矩阵, vector传参必须用模板泛型 template class Matrix { private: //2维的矩阵,2维的vector数组,vector就是一种动态数组 vector> array; public: //constructor(), 填充数组(行数) Matrix(int r... 阅读全文
posted @ 2017-03-22 23:10 影落明湖 阅读(806) 评论(0) 推荐(0) 编辑