版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、学计算机 复试his problem you will be given several descriptions of collections of nodes connected by directed edges. For each of these you are to determine if the collection satisfies the definition of a tree or not.58. age program of ACM (Airline of Charming Merlion) is really nice for the travelers flyi
2、ng frequently. Once you complete a flight wi CM, you can earn ACMPerk in your ACM age B depended on age you actual fly. In addition, you can use the ACMPerk age in your age B to exchange free flight ticket of ACM in future. The following table helps you calculate how many ACMPerk you can earn when y
3、ou fly on ACM. When you fly ACM Class Code Youll earn Class F Actual age + 100%age Bonus Business Class B Actual age + 50% age Bonus Economy Class Y 1-500500500+ Actual age Its shown t your ACMPerk age consists of two parts. One is your actual flight age (the minimum ACMPerk age for Economy Class fo
4、r one flight is 500 ), the other is the age bonus (its accuracy is up to 1 ) when you fly in Business Class and Class. For ex le, you can earn 1329 ACMPerk , 1994 ACMPerk and 2658 ACMPerk for Y, B or F class respectively for the fly from Beijing to Tokyo (the actual age bet n Beijing and Tokyo is 13
5、29). When you fly from Shanghai to Wuhan, you can earn ACMPerk 500 for economy class and ACMPerk 650 for business class (the actual age bet n Shanghai and Wuhan is 433 ). Your task is to help ACM build a program for automatic calculation of ACMPerk age.59. Weird Wallys Wireless Widgets, Inc. manufac
6、tures an eclectic assortment of small, wireless, network capable devi , ranging from dog collars, to pencils, to fishing bobbers. All these devi have very small memories. Encryption algorithms like Rijndael, the candidate for the Advanced Encryption Standard (AES) are demonstrably secure but they do
7、nt fit in such a tiny memory. In order to provide some security for transmis s to and from the devi , WWWW uses the following algorithm, which you are to implement. Encrypting a message requires three eger keys, k1, k2, and k3. The letters a-i form one group, j-r a second group, and everything else
8、(s-z and underscore) the third group. Within each group the letters are ro ed left by ki itions he message. Each group is ro ed independently of the other two. Decrypting the message means ng a right ro ion by ki itions within each group. Consider the message the quick brown fox encrypted with ki va
9、lues of 2, 3 and 1. The encrypted string is icuo bfnwhoq kxert. The figure below shows the decrypting right ro ions for one character in each of the three charactergroups.Looking at allthe letters he group a-i we see i,c,b,f,h,e appear at itions 2,3,7,8,11,17 with he encrypted message. After a right
10、 ro ion of k1=2, these itions conta he letters h,e,i,c,b,f. The tab elow shows the ermediate strings t come from ng all the ro ions he group, then all ro ions in the second group, then all the ro ions he third group. Ro ing letters in one group will not change any letters in any of the other groups.
11、All input stringscontain only lowercase letters and underscores( ). Each string will be at most 80 characters long. The ki areallitiveegershe range 1-100.60. The Gold Barbreceived information from reliable sourtheir last group of N coins exactlyone coin is false and differs in weight from other coin
12、s (while all other coins are equal in weight). After theeconomic crisis they have only a simpalance available (like onehcture). Using this balance, oneis able to determine if the weight of objectshe left pan is lessn, greatern, or equal to the weight ofobjectshe right pan. In order to detect the fal
13、se cohe bemployees numbered all coins by theegers from 1 to N, thus assigning each coin a uniquevarious groups of coins by placing equal numbers of coinseger identifier. Aftert they began to weighthe left pan andhe right pan. The identifiersof coins and the results of the weightings were carefully r
14、ecorded. You are to write a programt will helpthe bemployees to determine the identifier of the false coin using the results of these weightings.61. 编写个程序,将输字符串中的字符按如下规则排序。 规则1:英字从A到Z排列,不区分写。如,输:Type 输出:epTy 规则2:同 个英字的写同时存在时,按照输顺序排列。如,输:BabA 输出:aABb 规则3:英字的其它字符保持原来的位置。如,输:By?e 输出:Be?y样例:输:A Famous Saying: Much Ado About Nothing(2012/8).输出:A aaAAbc dFgghh: iimM nNn oooos Sttuuuy (2012/8).62. 题描述 把M个同样的苹果放在N个同样的盘,允许有的盘空着不放,问共有多少种不同的分法?(K表)5,1,1和1,5,1 是同 种分法。
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年秋人教版新教材九年级上册英语Unit 7单元测试B卷(含答案解析)
- 高中数学 加练 专题6 第54练 数列求和
- 高中物理 加强练习第三章 28.瞬时加速度问题
- 初一下册数学 讲义 第09讲 解一元一次不等式组 教案讲义及练习(学生版)
- 简易劳动合同范本
- 道路维修养护合同书
- 智慧酒店布线施工方案(3篇)
- 核酸检测应急预案方案(3篇)
- 水下挖淤泥施工方案(3篇)
- 没进行应急预案培训(3篇)
- 2026年高考广西卷物理高考真题(解析版)
- 公司档案管理办法及实施细则
- 广东省佛山市2025-2026学年高一下学期期末考试化学试卷
- 高密度集成电路制造环境紧急预案
- 高血压患者的健康教育内容
- 餐厨垃圾车收运工作制度
- 北京市2025国家能源局信息中心招聘应届毕业生2人笔试历年参考题库典型考点附带答案详解
- 水洗砂、碎石采购方案投标文件(技术标)
- 上海高校分类评价指标(试行)
- 国土规划股工作制度
- 统编版小学六年级语文下册《奋斗的历程》综合性学习项目化导学案
评论
0/150
提交评论