-
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
-
HDB3
用matlab编写的HDB3码 对于初学信息论编码的同学很有益处(HDB3 code matlab prepared students for the the beginner information theory coding helpful)
- 2012-11-22 19:12:57下载
- 积分:1
-
MATLAB
MATLAB图像分割提取算法源代码(示例车牌识别)(MATLAB image segmentation algorithm for extracting the source code (sample plate recognition))
- 2009-11-12 23:31:10下载
- 积分:1
-
MATLAB
最优化技术方法介绍及MATLAB的实现(科学工业出版社)(MATLAB optimization method)
- 2011-06-30 10:26:25下载
- 积分:1
-
基于遗传算法,进而优化惩罚因子-test_data
基于遗传算法,进而优化惩罚因子,核函数参数的的支持向量机进行分类(GA SVM classification)
- 2020-06-22 02:20:01下载
- 积分:1
-
SArrdcsrma
sar imaging algrithms
- 2007-03-08 14:03:38下载
- 积分:1
-
Diag_Rayon_Parabole_Guidonde
Antenne parabolique alimentée par guide d onde
- 2013-11-13 21:07:58下载
- 积分:1
-
ai_RayCh
改程序主要对无线通信中的瑞利慢衰落通信信道进行了matlab仿真,可于仿真试验时进行调用。(Reform procedures for major wireless communications in the slow Rayleigh fading communication channel to carry out the matlab simulation, simulation tests can be carried out call.)
- 2007-12-22 19:56:50下载
- 积分:1
-
zuixin
OFDM仿真程序
是关于同步方面的
OFDM系统中的同步技术研究(OFDM simulation program is on the synchronization aspects of OFDM system synchronization technology research)
- 2008-03-02 00:19:38下载
- 积分:1
-
haze-removal
基于暗原色去雾的图像代码,用了软抠图和另两种改进算法,附加txt说明文档(Based on dark colors to fog image code, with a soft matting, and another two improved algorithms, additional documentation txt)
- 2013-07-11 10:50:09下载
- 积分:1