-
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
-
small_image
MATLAB实现的高光谱图像的端元提取,可以自己下载高光谱图像,然后修改下程序就能用了。(MATLAB implementation of hyperspectral image endmember extraction of hyperspectral images can download and modify the following program can be used.)
- 2021-04-19 20:58:51下载
- 积分:1
-
test3_4
说明: 方程组追赶法的C++程序以及MATLAB源程序(Equations chase law procedures and the MATLAB C++ source code)
- 2011-04-12 00:03:24下载
- 积分:1
-
DrvInterface
该接口主要描述了关于应用层与90820之间的收发数据控制(description of the main interface for the application layer and between the TX 90820 Data Control)
- 2007-03-19 15:17:12下载
- 积分:1
-
Pmannizipr
流行学习的matlab代码,图图形界面,操作简单易懂,有说明。
(Popular learning matlab code, graphics interface, operation is simple and easy to understand, and instructions.)
- 2012-10-04 00:06:12下载
- 积分:1
-
EtherCAT-Slave-Stack-Code-Tool
slave stack code tool
- 2015-03-18 10:49:02下载
- 积分:1
-
guidefilter
引导滤波guidedfilter的opencv实现(guidedfilter s opencv version)
- 2015-04-01 22:56:18下载
- 积分:1
-
EnumerateAudioCaptureFilterCapabilities
audio card enumerate searching ok.
for multimedia developing project.
thank you
- 2014-01-08 17:50:46下载
- 积分:1
-
KinectwithMatlab
The release of the Kinect for Windows sensor and software development kit (SDK) for commercial applications opens up the limitless possibilities offered by Kinect technology. Together, the hardware and software offer a superior development platform for Windows and a higher quality, better performing experience for end users.
- 2012-04-22 12:43:43下载
- 积分:1
-
sushu
素数的判定,miller-rabin,sol-str,leman,fermat等。都可以运行,下完自后自己稍微改改就可以用。(Primes judgment, miller-rabin, sol-str, leman, fermat so on. Can run is finished after their own little changed since it can be used.)
- 2013-07-25 19:21:17下载
- 积分:1