文件名称:Demo
-
所属分类:
- 标签属性:
- 上传时间:2014-09-18
-
文件大小:893byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
号码分配过程中,用如下格式表示已经分配的号码:a1-b1,a2-b2, ... ,ai-bi, ... ,an-bn,其中ai-bi表示一段连续号码,ai代表起始号码,bi代表结束号码,简称号码段。
例如:
12-30,40-50,100-200
表示12到30号,40到50号,100到200号已经分配。
号码段之间用“,”分隔,号码段起止号码用“-”连接。
给定字符串s1,代表已经分配的号码,格式如上;
s2代表将要分配的号码,格式为a1-b1,即一个号码段。
编写程序给出最后分配的结果s3。
举例如下:
s1= 10-20,30-50
s2= 22-25
则s3= 10-20,22-25,30-50 。号码段22-25按顺序插入到了“10-20,30-50”之间。
编写中注意号码段合并问题,例如:
s1= 1-3,8-20
s2= 4-7
则s3不能等于 1-3,4-7,8-20 ,而是要将号码段进行合并。
合并后的结果应当是
s3= 1-20 -Number allocation process, using the following format has been assigned number: a1-b1, a2-b2, ..., ai-bi, ..., an-bn, where ai-bi expresses a sequential number, ai representatives from starting number, bi representative ending number, referred to paragraph numbers.
For example:
12-30,40-50,100-200
Said to the 30th 12, 40-50 number, 100-200 number has been assigned.
Between the number of segments with , separated, the beginning and ending number with the number of segments - connections.
S1 given string, representing the number has been assigned, the format above
s2 representative will be assigned numbers in the format a1-b1, that a number of segments.
The results given in the last programming assignment s3.
Examples are as follows:
s1 = 10-20,30-50
s2 = 22-25
The s3 = 10-20,22-25,30-50 . No segment 22-25 sequentially inserted into the 10-20,30-50 between.
Write the note numbers merger section, for example:
s1 = 1-3,8-20
s2 = 4-7
S3 is not e
例如:
12-30,40-50,100-200
表示12到30号,40到50号,100到200号已经分配。
号码段之间用“,”分隔,号码段起止号码用“-”连接。
给定字符串s1,代表已经分配的号码,格式如上;
s2代表将要分配的号码,格式为a1-b1,即一个号码段。
编写程序给出最后分配的结果s3。
举例如下:
s1= 10-20,30-50
s2= 22-25
则s3= 10-20,22-25,30-50 。号码段22-25按顺序插入到了“10-20,30-50”之间。
编写中注意号码段合并问题,例如:
s1= 1-3,8-20
s2= 4-7
则s3不能等于 1-3,4-7,8-20 ,而是要将号码段进行合并。
合并后的结果应当是
s3= 1-20 -Number allocation process, using the following format has been assigned number: a1-b1, a2-b2, ..., ai-bi, ..., an-bn, where ai-bi expresses a sequential number, ai representatives from starting number, bi representative ending number, referred to paragraph numbers.
For example:
12-30,40-50,100-200
Said to the 30th 12, 40-50 number, 100-200 number has been assigned.
Between the number of segments with , separated, the beginning and ending number with the number of segments - connections.
S1 given string, representing the number has been assigned, the format above
s2 representative will be assigned numbers in the format a1-b1, that a number of segments.
The results given in the last programming assignment s3.
Examples are as follows:
s1 = 10-20,30-50
s2 = 22-25
The s3 = 10-20,22-25,30-50 . No segment 22-25 sequentially inserted into the 10-20,30-50 between.
Write the note numbers merger section, for example:
s1 = 1-3,8-20
s2 = 4-7
S3 is not e
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Demo.c
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.