-
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
-
MatlabScript
利用MFC技术,借助MATLAB强大的数学计算能力。同时,MATLAB脚本方便修改,不需要重新运行程序。(Using MFC technology, using MATLAB a powerful mathematical calculation. At the same time, MATLAB scripts to facilitate changes, do not need to re-run the program.)
- 2010-06-24 07:35:25下载
- 积分:1
-
matlab-tutorials
说明: Matlab教程,可以借助其学习和使用Matlab,使用软件过程中还可以查阅。(Matlab tutorials can make use of their learning and the use of Matlab, using the software process can access.)
- 2011-03-05 10:32:27下载
- 积分:1
-
层次分析法
说明: 通过使用matlab,对层次分析法进行求解,从而进一步确定权重,更快的解决问题。(By using matlab, the analytic hierarchy process (AHP) is solved to further determine the weight and solve the problem more quickly.)
- 2019-04-18 08:56:05下载
- 积分:1
-
Heuristic-search-algorithm-of-matlab
简单的基于matlab的启发式搜索算法。(The matlab simulation method of heuristic search algorithm。)
- 2014-11-06 09:38:48下载
- 积分:1
-
Affractalp
应用毯子法求一幅图像的分形维维数,matlab上的应用方法
(The application of a blanket of an image through the fractal dimension of the Matlab application method)
- 2012-07-18 20:50:55下载
- 积分:1
-
Blind_Adaptive_Filtering123
自适应滤波的matlab代码,非常实用,可配合专门的书籍参考(Adaptive filtering matlab code, very practical, with special reference books)
- 2015-04-06 13:01:30下载
- 积分:1
-
fuzzy2
说明: FUZZY LOGIC gaussian function /triangular function
- 2019-05-01 22:27:39下载
- 积分:1
-
ipiqxiebo
这是一个电力系统谐波检测的MATLAB仿真模型,采用的是基于瞬时无功功率理论的ip-iq法,效果很好(This is a power system harmonic detection MATLAB simulation model, based on the instantaneous reactive power theory ip-iq method, the effect is very good)
- 2017-04-02 11:42:44下载
- 积分:1
-
LMS
基于LMS算法的均衡技术在matlab上的仿真应用(Equalization technique based on the LMS algorithm in matlab simulation applications)
- 2013-08-28 21:57:31下载
- 积分:1