




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、亚马逊2013校招笔试题 Give n an array with positive in tegers and ano ther in teger for example7 2 4 9, you are required to gen erate an equati on, by insertingoperator add ( + ) and minus ( - ) among the array . The left side of equati on are con sist of the array and the right side of equati on is the in t
2、eger. here the result is 7-2+4=9 Rules: Don t in clude any space in the gen erated equati on. In case there is no way to create the equation, please output Inv alid . For example 1 1 10, output is In valid The len gth of the in teger array is from 1 to 15( in clude 1 and 15). If the len gth is 1, fo
3、r example the in put 7 7, the output is 7=7 There is no operator + or - in front of the first nu mber: Don t cha nge the order of the nu mbers. For example: 7 2 4 9. 7-2+4=9 is correct an swer, 4-2+7=9 is wrong an swer. There could be multiple in put, meaning your fun cti on could be called multiple
4、 times. Do remember print a new line after the call. Sample In put and Output: In put: 1 2 3 4 10 2 1 2 3 4 5 Output: 1+2+3+4=10 In valid Question 2 / 2 are Questi on: There is a 5*5 matrix; the elements in this matrix differe nt in teger from 0 to 24. The eleme nts in this matrix are 3 24, 15, 11,
5、12, 9 5 be disordered. 0 is a special eleme nt. The upper eleme nt, un der element, left element and right element of 0 can excha nged with 0. Such excha nge operatio ns are n amed as U , D , L and R . Operati on U means 0 excha nged with its upper eleme nt. Operati on D means 0 excha nged with its
6、un der eleme nt. Operati on L means 0 excha nged with its left eleme nt. Operati on R means 0 excha nged with its right eleme nt. For example, the origi nal matrix is 24, 4, 15, 11,9 13, 0, 22, 12, 14 23, 16, 1,2, 5 21, 17, 8, 3, 6 With the operati on seque nee URRDDL , the new matrix will be 20, 18
7、, 7, 19, 10 13, 4, 22, 2, 14 23, 16, 0, 1, 5 21, 17, 8, 3, 6 Now, we know the original matrix, the matrix after the operati ons and all the operati ons made on the orig inal matrix. Please provide the correct seque nee for the operati ons. The in put will be the orig inal matrix, the target matrix a
8、nd an operati on seque nee with wrong order. If there is a correct sequenee for this in put, then print the correct seque nee. Otherwise, print None . Rules and example: The eleme nts in the origi nal matrix are differe nt. The eleme nts in the origi nal matrix are ran dom ordered. The max len ght o
9、f operato ins is 15. If 0 is already on the boun dary, it is not possible to do further movement.for example, if 0 is in the top row, then there is no more U . The in put will be the orig inal matrix, the target matrix and an operati on seque nee with wrong order. The output will be a correct operati on seque nee. In ease there is no way to get the target matrix with
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年全国注册监理工程师继续教育考试题库及参考答案
- 2025年保育员(高级)操作证考试试题及答案
- 国开《管理英语4》形考任务综合测试(不含听力部分)
- 分数教学内容分析报告
- 现代企业内部控制管理流程
- 2025年福建省福州市高新实验中学中考数学适应性试卷(3月份)
- 数学知识点归纳与强化训练方案
- 2025年考研英语(二)阅读理解长难句处理技巧训练试卷 提高能力
- 2025年经济师职业资格考试 经济基础知识考点深度分析与模拟试卷
- 2025年导游资格证考试考前冲刺试卷:导游业务核心知识与策略
- 森林防火智能预警监测系统方案
- 1200吨黑水虻养殖项目可行性研究报告写作模板-备案审批
- 13《黄鹤楼》公开课课件
- 申办餐饮食品经营许可证:14项管理制度清单
- 为什么篮球可以弹起来
- 第2课 第一框 中国特色社会主义的开创和发展
- 鱼池净化系统施工方案
- 新概念第一册语法汇总
- 第八届全国小动物医师技能大赛考试复习题库(含答案)
- 2输变电工程施工质量验收统一表式(变电工程土建专业)
- 公司职级职务管理办法RL
评论
0/150
提交评论