版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- Java后端项目部署流程要领
- 区块链技术工作原理解析
- 2026年软件测试入门软件缺陷识别与评估试题库
- 2026年中华医学百科之中医基础理论与临床实践题库
- 2026年系统集成项目管理中的质量控制与测试题目
- 2026年机械工程材料与加工工艺试题
- 2026年金融分析师投资风险管理方向专业知识题
- 2026年电商系统运维电商服务器架构优化与配置问题集
- 2026年厨师职业技能鉴定考试理论模拟题
- 2026年网络工程师面试问题及解决方案指南
- 2026年甘肃省公信科技有限公司面向社会招聘80人(第一批)笔试模拟试题及答案解析
- 文献检索与论文写作 课件 12.1人工智能在文献检索中应用
- 艾滋病母婴传播培训课件
- 公司职务犯罪培训课件
- 运营团队陪跑服务方案
- 北京中央广播电视总台2025年招聘124人笔试历年参考题库附带答案详解
- 2023年内蒙专技继续教育学习计划考试答案(整合版)
- 《通信工程制图》课程标准
- 石油天然气建设工程交工技术文件编制规范(SYT68822023年)交工技术文件表格仪表自动化安装工程
- 马鞍山市恒达轻质墙体材料有限公司智能化生产线环保设施改造项目环境影响报告表
- GB/T 26332.6-2022光学和光子学光学薄膜第6部分:反射膜基本要求
评论
0/150
提交评论