搜索资源列表
cclasspoint
- 首先定义一个点类Point,其私有成员为其坐标X,Y。设计构造函数,拷贝构造函数,析构函数(可以什么都不做,只打印信息,表示其被调用),设置新值函数Set, 打印成员值函数Print。再定义一个线类Line,线类是在公有继承点类的基础上,新增私有成员斜率S,并设计构造函数,拷贝构造函数,析构函数(可以什么都不做,只打印信息,表示其被调用),设置新值函数Set, 打印成员值函数Print以及其它你认为对访问此Line类对象有用的成员函数。并用此Line类定义对象,调用所有成员函数。尤其是考察构造函
dda
- 该算法的准确程度受斜率影响,若斜率大于2,则能观察到直线成为点线,斜率大于一是最完美的。-The accuracy of the algorithm is affected by the slope, if the slope is greater than 2, then a straight line can be observed as dotted lines, the slope is greater than one of the most perfect.
middlg
- 1. 建立一个基本对话的exe工程,并命名为circle; 2. 插入一个对话框资源,以在此对话框上输入圆心坐标、半径及颜色,并为此建立一个新类,命名为CDlg; 3. 在IDD_CIRCLE_DIALOG上删除已有控件,并添加一个Button,命名为Button1; 4. 在CcircleDlg内添加3个double型成员变量,命名为x,y,r,然后添加1个COLORREF的成员变量,命名为color; 5. 在CDlg内加入3个Edit box,在加入一个button2;
nQueen
- 在n*n的棋盘上放置n个皇后,要求皇后两两互斥,即任意两个皇后不能出现在同一行、同一列或同一条斜对角线上。试求出所有的合法布局-In the n* n chessboard placed on the n Queens, asked the Queen twenty-two mutually exclusive, that is, any two queens can not appear on the same line, same column, or diagonal line with
hdu3480Division
- hdu3480Division的源码,解法是斜率优化DP-hdu3480Division source, Solution slope optimize DP
DP
- 随着动态规划在 OI 中的广泛运用,动态规划问题已经不再停滞于能够写出 方程就能得到完美解答。如今考察我们的对于动态规划的运用往往是考察动态规 划的优化,也就是降维。我们已经知道维护方程中的决策可以选择用数据结构进 行优化,比如:Splay、线段树,等等。这样的优化仅能将方程的时间复杂度下 降一个 LogN 的级别。如果 N 的范围相当大,即使下降一个 LogN 的级别也依然 超时呢?我们引进一种更强的优化——斜率优化。-With the extensive use of d
MaxPointsonaLine
- Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 分析:首先要注意的是,输入数组中可能有重复的点。由于两点确定一条直线,一个很直观的解法是计算每两个点形成的直线,然后把相同的直线合并,最后包含点最多的直线上点的个数就是本题的解。我们知道表示一条直线可以用斜率和y截距两个浮点数(垂直于x轴的直线斜率为无穷大,截距用x截距),同时还需要保存每
slope
- Say no more vector algorithm, very valuable -Say no more vector algorithm, very valuableSay no more vector algorithm, very valuable
