-
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
-
houxuanren
对候选人得票进行统计,设有3个候选人,最终只能有1人当选为领导。(Statistics on the number of votes a candidate with three candidates, we can only have one person elected as leader.)
- 2015-04-22 11:49:28下载
- 积分:1
-
rounds-of-disaster
关于灾情巡视路线问题的数学模型,利用的是Floyd算法以及Hamilton圈改良算法(a modeling about rounds of disaster,taking advantage of the Floyd algorithm and improved Hamilton circle algorithm)
- 2011-12-28 20:20:20下载
- 积分:1
-
experiment-with-eye-diagrams
实验四 数字解调与眼图
1. 验证2DPSK 相干解调原理。
2. 验证2FSK 过零检测解调原理。
(Four digital demodulation experiment with eye diagrams
1. verify the 2DPSK coherent demodulation.
2. Verify 2FSK zero-crossing detection and demodulation principle.)
- 2015-02-20 16:27:04下载
- 积分:1
-
matlab-fluent-heat-con
matlab求解热传导方程的几个例子,有注释,适合初学者(matlab solving a few examples of the heat conduction equation, with notes, suitable for beginners)
- 2012-05-22 17:04:00下载
- 积分:1
-
NumericalCaculation
数值计算的类函数,运算能力超过Matlab(Numerical Calculation)
- 2009-07-08 11:22:08下载
- 积分:1
-
signal-processing
采用自适应信号处理技术的低成本回波抵消器(Adaptive signal processing techniques echo canceler cost)
- 2013-12-09 13:35:35下载
- 积分:1
-
1
说明: vb调用MATLAB的程序说明,非常好用(vb call the MATLAB program that is very easy to use)
- 2011-02-11 11:45:37下载
- 积分:1
-
vc_matlab
用VC调用Matlab的文章,文章详细介绍了几种方法,并给出了示例(VC call Matlab with the article, the article details several ways, and gives examples of)
- 2007-10-29 20:39:00下载
- 积分:1
-
poleo-de-datos
an a dedicated hyperterminal
- 2014-02-04 00:25:11下载
- 积分:1