文件名称:aaa
-
所属分类:
- 标签属性:
- 上传时间:2013-04-30
-
文件大小:649byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
某校大门外长度为L的马路上有一排树,每两棵相邻的树之间的间隔都是1米。我们可以把马路堪称一个数轴,马路的一端在数轴0的位置,另一端在L的位置;数轴上的每个整数点,即0,1,2,……,L,都种有一棵树。由于马路上的一些区域中的始点和终点的坐标都是整数,区域之间可能有重合部分。现在要把这些区域中的树(包括2端点)移走。计算还剩多少树?-There are several test cases in the input. Each case starts with an integer L (1 <= L < 2000000000) representing the length of the road and M (1 <= M <= 5000) representing the number of sections that are assigned for other use.  The following M lines each describes a section. A line is in such format:  Start End  Here Start and End (0 <= Start <= End <= L) are both non-negative integers representing the start point and the end point of the section. It is confirmed that these sections do not overlap with each other.  A case with L = 0 and M = 0 ends the input.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
aaa.c
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.