-
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
-
InverseList
说明: 链表逆转,实现单链表的逆转程序,数据结构(List Inverse)
- 2011-04-04 11:15:58下载
- 积分:1
-
gauss_gen
高斯白噪声序列的产生-使用瑞利分布,
C语言产生1000个点的高斯白噪声序列。(Gaussian white noise sequence to produce- produce 1000 using a Rayleigh distribution point Gaussian white noise sequence)
- 2015-01-27 19:13:27下载
- 积分:1
-
gui
使用matlab的GUI功能编写的一个计算器,可以方便快捷的使用(the Calculator program by matlab
)
- 2012-02-11 20:18:52下载
- 积分:1
-
ARM应用程序
屏幕输出(pingmushuchu)
- 2017-07-08 21:36:17下载
- 积分:1
-
SHUJU
网络自学习启发式算法的opnet仿真程序源代码,在自学习过程中反应过程(Network self-learning heuristics opnet simulation program source code, the reaction the learning process)
- 2021-02-08 14:59:54下载
- 积分:1
-
DXFToGCode20120923
VC++6.0编写的CAD dxf文件直接转换为数控加工G代码程序。直接调入DXF文件,生成可用于数控加工的G代码。(Written by VC++6.0 CAD DXF files directly into G code program of CNC machining. Direct load DXF file generation, can be used for NC machining G code. )
- 2020-10-28 15:19:59下载
- 积分:1
-
AI-90-10
人工智能算法包含各种情况可在Delphi和C++中使用(artificial intelligence algorithms encompass a variety of situations in Delphi and C use)
- 2007-06-14 00:55:19下载
- 积分:1
-
MyPortScanner
端口扫描程序,对计算机端口进行扫描。VC源码。(Port scanning process to scan the computer ports. VC source.)
- 2008-06-13 10:08:25下载
- 积分:1
-
sonar-image-data
硕士学位论文:在高分辨率成像声纳系统和回波测深仪的两个控制平台的基础上对声纳图像数据的高速显示技术的研究。文中所有的程序编写都是使用C和C++语言,在WindowsXP平台下利用VC++6.0进行编译和调试的。(study for high speed display technology on sonar image data)
- 2012-05-02 07:37:04下载
- 积分:1