- 1、本文档共10页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
2013东北赛试题册--热身赛.pdf
A...Hotel Bytelandia
Time Limited: 1S Memory Limited: 32M
Description:
A holiday weekend is coming up, and Hotel Bytelandia needs to find out if it has
enough rooms to accommodate all potential guests. A number of guests have made
reservations. Each reservation consists of an arrival time, and a departure time. The
hotel management has hired you to calculate the maximum number of guests that
will be at the hotel simultaneously. Note that if one guest arrives at the same time
another leaves, they are never considered to be at the hotel simultaneously (see the
second example).
Input:
Input will begin with an integer T(T ≤100), the number of test cases. Each test
case begins with an integer N(N ≤100), the number of guests. Two lines follow, each
with exactly N positive integers. The i-th integer of the first line is the arrival time of
the i-th guest, and the i-th integer of the second line is the departure time of the i-th
guest (which will be strictly greater than the arrival time). All arrival/departure times
will be between 1 and 1000, inclusive.
Output:
For each test case, print the maximum number of guests that are
simultaneously at the hotel.
Sample Input:
3
3
1 2 3
4 5 6
5
1 2 3 4 5
2 3 4 5 6
7
13 6 5 8 2 10 12
19 18 6 9 9 11 15
Sample Output:
3
1
3
B...Binary Code
Time Limited: 1S Memory Limited: 32M
Description:
Lets say you have a binary string such as the following:
011100011
One way to encrypt this string is to add to each digit the sum of its adjacent
digits. For example, the above string would become:
123210122
In particular, if P is the original string, and Q is the encrypted string, then Q[i] =
P[i-1] + P[i] + P[i+1] for all digit positions i. Characters off the left and right edges of
the string are
您可能关注的文档
- 2012-2013学年第二学期七年级英语期末试卷.doc
- 2012.4.21公务员联考行测真题及试题答案详解.pdf
- 20121015--打印机--三星激光黑白多功能一体机SCX-3401FH如何调节复印深浅度?.pdf
- 2012CB721100-G新功能人造生物器件的构建与集成.pdf
- 2012―2013学年第二学期研究生课程考试计划表.doc
- 2012中国(宁夏)国际投资贸易洽谈会暨-2017中国—阿拉伯.PDF
- 2012年5月-中国十大银行标志与广告语.ppt
- 2012年东南大学微机在生物医学的应用考研复试题.pdf
- 2012年全国运输机场生产统计公报.pdf
- 2012年全国高中数学联赛安徽赛区预赛.pdf
文档评论(0)