网站大量收购独家精品文档,联系QQ:2885784924
  1. 1、本文档共33页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
[工学]ACM

一、Jolly Jumpers Timelimit 1s A sequence of n 0 integers is called a jolly jumper if the absolute values of the difference between successive elements take on all the values 1 through n-1. For instance, 1 4 2 3 is a jolly jumper, because the absolutes differences are 3, 2, and 1 respectively. The definition implies that any sequence of a single integer is a jolly jumper. You are to write a program to determine whether or not each of a number of sequences is a jolly jumper. Each line of input contains an integer n 3000 followed by n integers representing the sequence. For each line of input, generate a line of output saying Jolly or Not jolly. Sample Input 4 1 4 2 3 5 1 4 2 -1 6 Output for Sample Input Jolly Not jolly 二、密码截获 时限:1s Catcher是MCA国的情报员,他工作时发现敌国会用一些对称的密码进行通信,比如像这些ABBA,ABA,A,123321,但是他们有时会在开始或结束时加入一些无关的字符以防止别国破解。比如进行下列变化ABBA-12ABBA,ABA-ABAKK,123321。因为截获的串太长了,而且存在多种可能的情况(abaaab可看作是aba,或baaab的加密形式),Cathcer的工作量实在是太大了,他只能向电脑高手求助,你能帮Catcher找出最长的有效密码串吗? 三、输入 测试数据有若干行字符串,包括字母,数字,符号。(字母区分大小写) 输出 与输入相对应每一行输出一个整数,代表最长有效密码串的长度。 范例: 输入 ABBA 12ABBA、 A ABAKKabaaab 输出 4 4 1 3 6 5 四、最小的回文数 给出一个数X,求比X大的最小的回文数!(x10^20) 样例输入: 1 10 12 样例输出: 2 11 22 五、Problem B Be carefull Problem “Be carefull about the precision!”When Tyr doing his mathemetic homework,teacher Mr.Qian always giving this warning to him.Now,Tyr has finished his mathemetic homework,and here is your task to check whether Tyr’s answer is correct or not. Input The input consist of several cases.The first line gives the case number N, the next part has N cases.Each case is consist of two number R and I.R is a real number; I is an integer number. Output For each case please give your check.If R rounds to I,then print “Correct” in a single line, or,print “Not Correct”.For more detail,please look at the samples. Sample Input 5 1.20 1 0.5 1 9.9 10 2.9 2 3.4999 3 sample output Correct Correct Correct Not Correct Correct 六、Tight words Time limit 1s Given is an alphabet {0, 1, ... , k}, 0 = k = 9

您可能关注的文档

文档评论(0)

ctuorn0371 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档