-
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
-
YunQiPaiBan
一个简单的文本匀齐排版程序源代码,基于WIN32控制台的(A simple text smoothing Qi typesetting program source code, based on WIN32 console)
- 2010-01-05 13:29:56下载
- 积分:1
-
11.CPP-Primer-3rd
11.C++ Primer 3rd(中文版),众所周知的C++学习经典书籍,C++学习圣经(11.C++ Primer 3rd (Chinese version))
- 2015-04-04 10:28:24下载
- 积分:1
-
Angular-precision
基于均匀圆阵的信号二维方向角高精度估计 (Angular precision estimates based on two-dimensional uniform circular array signal direction)
- 2013-12-08 17:06:55下载
- 积分:1
-
functionguotao
演化计算是基于随即搜索的新算法;它的技术模型源于自然的演化。下面是一个例子,该函数是典型的多峰(震动剧烈)的函数。用的算法是郭涛算法。(Evolutionary Computation is based on the then new search algorithm its technical model derived from natural evolution. Here)
- 2008-04-30 23:55:32下载
- 积分:1
-
TLBGmatlaabh
毕业设计做的...用LBG算法实现矢量量化的算法法..matlab ,经测试可直接使用。
(Graduation design ... vector quantization algorithm method using the LBG algorithm .. Matlab, has been tested and can be used directly.)
- 2012-07-18 11:29:00下载
- 积分:1
-
kalaman
kalman filter program...extended kalman filter
- 2011-05-22 03:23:06下载
- 积分:1
-
APF
一个基于MATLAB的三电平有源滤波器的仿真(A three level of active filter based on MATLAB simulation
)
- 2015-06-04 10:13:19下载
- 积分:1
-
time---delay
进行时延估计 包含双谱和互相关两种方法 没有高阶累积量(For time delay estimation contains double spectrum and cross-correlation two ways No higher order cumulants
)
- 2014-09-10 09:40:18下载
- 积分:1
-
Xu-White-model
用C++编写的xu-white模型,适合砂泥岩地层岩石物理建模,很实用(Written by C++ xu-white model, suitable for sand-shale formation rock physics modeling, it is practical)
- 2020-12-25 09:59:04下载
- 积分:1