版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025至2030年中国海水淡化反渗透设备数据监测研究报告
- 2025至2030年中国圆型滚烫机数据监测研究报告
- 2025至2030年中国农业级腐植酸钾数据监测研究报告
- 2025至2030年中国五金机械砂轮数据监测研究报告
- 2025年中国马桶市场调查研究报告
- 2025年中国钛三通市场调查研究报告
- 2025年中国草灰市场调查研究报告
- 宗教场所装修安全合同
- 高端美容院装修设计协议
- 2025至2031年中国滴耳油行业投资前景及策略咨询研究报告
- 劳动合同续签意见单
- 大学生国家安全教育意义
- 2024年保育员(初级)培训计划和教学大纲-(目录版)
- 河北省石家庄市2023-2024学年高二上学期期末考试 语文 Word版含答案
- 企业正确认识和运用矩阵式管理
- 分布式光伏高处作业专项施工方案
- 陈阅增普通生物学全部课件
- 检验科主任就职演讲稿范文
- 人防工程主体监理质量评估报告
- 20225GRedCap通信技术白皮书
- 燃气有限公司客户服务规范制度
评论
0/150
提交评论