
算法攻略
文章平均质量分 76
wang2124596
这个作者很懒,什么都没留下…
展开
-
【动态规划】钢条切割的最佳方案
什么是动态规划: 动态规划包含了分治法的思想——将原问题分解为规模较小,但是类似于原问题的一系列子问题分而求之,并最终得到原问题的解。 而动态规划又与分治法不同:分治法通常用来求解原问题中的子问题互不相交——不同的子问题没有或极少有相同的子子问题。动态规划正好相反,将其应用于子问题重叠的情况,可以避免对于相同的子问题进行过多的不必要的工作——对每个子子问题只求解一次,并将结原创 2013-05-16 21:14:36 · 1960 阅读 · 0 评论 -
POJ_1001(Exponentiation) 求高精度幂 攻略中...
题目如下:DescriptionProblems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience原创 2013-05-19 14:45:13 · 558 阅读 · 0 评论 -
大数运算类
#include #include #include #include #include using namespace std;class LNUM{private: enum { _LimitSize = 4, _Mod = 10000 }; int _sign; //存放数的正负号 vector _integer; //存放整数原创 2013-05-26 19:07:37 · 523 阅读 · 0 评论