-
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
-
DXFTest
说明: 非常有用的资料,C#源码,能够直接导入DXF文件,并对DXF文件分析是圆、线,轮廓等形状,并对形状进行分析,可以直接生成G代码或者点位信息。自己可以拿点位信息再做处理。(Very useful information, C # source code, can directly import DXF file, and DXF file analysis is circular, line, contour and other shapes, and shape analysis, can directly generate G code or point information. I can take the point information and then do the processing.)
- 2019-04-13 10:58:41下载
- 积分:1
-
ZStack-CC2530-2.3.0-1.4.0
C语言编写ZigBee源码组网实现(IAR软件平台)(IT could help you to make a net.)
- 2019-06-09 18:57:37下载
- 积分:1
-
branch-and-bound-algorithm
利用c++实现城市遍历问题的分枝定界算法。(Use c++ achieve urban traversal problem branch and bound algorithm.)
- 2013-07-28 09:52:30下载
- 积分:1
-
PriorityQueue.tar
Priority Queue Data Struct
- 2014-11-09 02:17:13下载
- 积分:1
-
数据结构实训旅店pos机管理系统
1.前台管理:包括房间的查询、入住登记、旅客信息的查询、旅客费用的查询、退房结算等。
2.后台管理:包括客房间信息的录入、修改、删除等。
3.设计数据结构文件来实现数据库管理:包括数据录入、查询、删除、修改、更新。
2.功能简易介绍: 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
- 2022-03-14 04:39:27下载
- 积分:1
-
39.3
说明: 编制程序,将输入的一行字符以加密的形式输出,然后将其解密,解密的字符串序列与输入的正文相比较,吻合时输出解密的正文,否则解密失败。
加密时,将每个字符的ascii码依次反复加上“4962873”中的数字,并在32(‘’)~122(‘z’)之间作模运算。解密与加密的顺序相反。例如输入正文“the result of 3 and 2 is not 8” 结果为:
(Programming, the input line character output in an encrypted form, and then decrypted, the decrypted text sequence of characters compared with the input, output to decrypt the body of the agreement, otherwise the decryption failed. Encryption, ascii code of each character in turn repeatedly with " 4962873" in the figures, and 32 (' ' )~ 122 (' z' ) as a model between the operations. Decryption and encryption in reverse order. For example, enter the text " the result of 3 and 2 is not 8" results:)
- 2011-04-05 08:43:48下载
- 积分:1
-
ADtlc2543P12864
基于51单片机12864显示的12位AD程序tlc2543(Based on 51 single-chip 12 864 Displaying 12 AD process tlc2543)
- 2013-08-24 10:03:59下载
- 积分:1
-
111
八皇后问题,用C语言实现,在VC++6.0环境中可以运行!92种答案(Eight queens problem)
- 2012-06-18 21:02:54下载
- 积分:1
-
foc控制算法FOC_stm32主控pmsm源码
STM32无感FOC控制源码,适合新手学习FOC(BLDC CONTROL BASE STM32)
- 2021-04-27 12:58:44下载
- 积分:1