版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 八年级数学下册 24.3 平移与轴对称(原卷版)
- 智能恒温酒柜赋能养老机构:适老化智能存储的健康价值
- 夯实产业底座 2026-2027年广东省源网荷储一体化可行性研究报告
- 智能分酒器赋能新零售:无人零售终端与酒水即时配送闭环
- 宠物食品“品质回归”2.0时代:从营销驱动到科学配方的范式跃迁
- 智能CO₂传感器2.0时代:从被动监测到主动干预的范式
- 物联网技术在智慧城市中的应用场景分析
- 2027年江西省九江市高职单招职业技能考试题库附答案详解【模拟题】
- 2026年许昌技师学院高职部高职单招职业适应性测试考试题库含答案详解(培优B卷)
- 2024年云南省怒江州高职单招职业适应性测试考试题库附参考答案详解(研优卷)
- 2026年黔东南州凯里市事业单位招考考试(63名)易考易错模拟试题(共500题)试卷后附参考答案
- 电力工程施工现场环境保护措施
- 九江市液化石油气公司九江经营分公司2026年面向社会公开招聘工作人员【13人】笔试参考题库及答案详解
- 2026年6月成都兴城投资集团有限公司成都蓉城城市管理服务有限公司校园招聘11人笔试题库附完整答案详解【必刷】
- 永定河流域投资有限公司招聘笔试题库2026
- 五年级河南下册试卷及答案
- 企业运营中心组织架构及岗位职责
- 《义务教育第二学段数学教学生活化的问题及对策研究》
- GB/T 7341.3-2024电声学测听设备第3部分:短时程测试信号
- 2024年广西电力行业职工职业技能大赛(电力交易员赛项)理论考试题库-中(多选题)
- 11BS3给水工程华北标图集
评论
0/150
提交评论