-
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
-
Subclust
减聚类的类代码,可以直接使用获得类中心,类数目(Clustering by class code, you can directly use a type of center, type the number of)
- 2008-04-08 10:56:52下载
- 积分:1
-
ccsfir
说明: 一个MATLAB的应用程序,很方便的!使用时需要转换为M文件。(a MATLAB applications, a convenient! Use need to change for the M documents.)
- 2006-03-16 16:35:57下载
- 积分:1
-
SimpleService
How to start or stop a windows NT service.
- 2006-09-27 19:32:17下载
- 积分:1
-
matlabyingqingdiaoyong
利用VC调用MATLAB引擎实例,简单实用(failed to translate)
- 2010-01-10 11:20:56下载
- 积分:1
-
MACD-Divergence-EA
利用macd背离信号开单,它能省去很多人为的干预,自动交易,避免人性的恐惧和贪婪的弱点!(it use MACD divergence to trade!)
- 2014-10-21 10:43:49下载
- 积分:1
-
NRFlowOfCartesian
基于直角坐标的牛顿拉弗逊法潮流计算程序,经过IEEE14模型测试。(the newton_lafason power flow )
- 2014-11-19 15:43:17下载
- 积分:1
-
matlab4
利用matlab进行五点三次法平滑处理(时域和频域)(Using matlab 5.3 times France smoothing process (time domain and frequency domain))
- 2013-09-15 10:46:29下载
- 积分:1
-
vc_matcom_dll
VC和MATLAB的混合编程技术之一,matcom生成dll,vc成功调用的例子(One of a combination of VC and MATLAB programming technology, matcom generate DLL, VC example of a successful call
)
- 2013-09-18 14:29:03下载
- 积分:1
-
function
悬置功能计算的,能量解耦的方法,优化及其位移的计算(The calculation of suspended function, energy decoupling method, optimization and calculation of displacement)
- 2015-08-06 09:23:13下载
- 积分:1