-
2
说明: 有一个长度为整数L(1<=L<=10000)的马路,可以想象成数轴上长度为L的一个线段,起点是坐标原点,在每个整数坐标点有一棵树,即在0,1,2,...,L共L+1个位置上有L+1棵树。
现在要移走一些树,移走的树的区间用一对数字表示,如 100 200表示移走从100到200之间(包括端点)所有的树。
可能有M(1<=M<=100)个区间,区间之间可能有重叠。现在要求移走所有区间的树之后剩下的树的个数。
输入:
两个整数L(1<=L<=10000)和M(1<=M<=100)。
接下来有M组整数,每组有一对数字。
输出:
可能有多组输入数据,对于每组输入数据,输出一个数,表示移走所有区间的树之后剩下的树的个数。(Has a length of integer L (1 < = L < = 10000) of the road, one can imagine a number line segment of length L, the starting point is the coordinate origin, each integer coordinate points in a tree, i.e. 0,1 , 2, ..., L total has L+1 L+1 positions on the tree. Now to remove some trees, tree removed by a range of digitally represented, such as 100 200 represents removed (inclusive) between 100 and 200 all the trees. There may be M (1 < = M < = 100) intervals, there may be overlap between the intervals. Now, after the number of trees require the removal of all remaining sections of the tree. Input: two integer L (1 < = L < = 10000) and M (1 < = M < = 100). Then there is an integer M groups, each with a pair of numbers. Output: there may be multiple sets of input data, for each set of input data, the output of a number indicating the number of the removal of all remaining sections of the tree after tree.)
- 2015-03-22 23:35:47下载
- 积分:1
-
subspace-matlab
协方差驱动随机子空间法的matlab算法,我下的。(Covariance-driven stochastic subspace method)
- 2013-04-15 20:49:44下载
- 积分:1
-
gongetidu
共轭梯度法的matlab实现,给出任意的一个对称矩阵,可通过较小的迭代次数得到所要求精度的数值解(Conjugate gradient method matlab to achieve, given any symmetric matrix by a smaller number of iterations to obtain the required accuracy of the numerical solution)
- 2012-11-12 21:37:19下载
- 积分:1
-
knn-code
给定一个样本集exset,样本数为M,每个样本点是N维向量,对于给定目标点d,d也为N维向量,要从exset中找出与d距离最近的k个点(k<=N)(knn code c++)
- 2012-04-13 11:34:28下载
- 积分:1
-
xingyouxian
Matlab的行优先算法,可以方便的判断对如机场、火车站、公交车的就座问题进行分析(Matlab line priority algorithm, it will be convenient for the judge, such as airports, railway stations, bus seat to undertake an analysis of)
- 2007-11-25 15:45:11下载
- 积分:1
-
li1
请用多层感知器(MLP)神经网络误差反向传播(BP)算法实现异或问题(输入为,要求可以判别输出为0或1),并画出学习曲线。其中,非线性函数采用S型Logistic函数。(Please use the Multilayer Perceptron (MLP) back propagation neural network (BP) algorithm XOR problem (input is required to determine the output is 0 or 1), and draw the learning curve. Among them, the non-linear function using S-type Logistic functions.
)
- 2014-09-21 15:28:12下载
- 积分:1
-
A
Execution cmd.rarExecution cmd.rarExecution cmd.rarExecution cmd.rarExecution cmd.rarExecution cmd.rar
- 2013-12-12 22:11:11下载
- 积分:1
-
Hidden_Markov_model_for_automatic_speech_recogniti
Hidden_Markov_model_for_automatic_speech_recognition
This code implements in C++ a basic left-right hidden Markov model
and corresponding Baum-Welch (ML) training algorithm. It is meant as
an example of the HMM algorithms described by L.Rabiner (1) and
others. Serious students are directed to the sources listed below for
a theoretical description of the algorithm. KF Lee (2) offers an
especially good tutorial of how to build a speech recognition system
using hidden Markov models.
- 2007-10-26 19:01:21下载
- 积分:1
-
strapdown
LM算法的MATLAB实现。Levenberg-Marquardt算法是最优化算法中的一种。最优化是寻找使得函数值最小的参数向量。(LM algorithm in MATLAB. Levenberg-Marquardt algorithm is an optimization algorithm. Optimization is to find the minimum value makes the function parameter vector.)
- 2013-11-09 22:28:19下载
- 积分:1
-
cnh
学习matlab的解微分方程的小程序,已经测试无误(The solution of differential equations matlab learning applets, have been tested correctly)
- 2011-09-27 08:30:28下载
- 积分:1