2015亚信校园招聘试题

合集下载

2015年银行招聘考试题库及答案详解

2015年银行招聘考试题库及答案详解

2015年银行招聘考试题库及答案详解(英语)单选题1.it seems that the managers didn'ttahke reasonable care in______the unprofitable divisions.A.being restructuredB.restructuringC.restructureD.restructured2.The manager was______for the damage caused by his staff's lack of care.A.respectfulB.availableC.resourcefulD.responsible3.The head of marketing was concerned______the major change in the business environmet.A.toB.inC.thatD.about4.The floor manager,as well as his managerial staff,______the customer's phone call.A.haven't returnedB.hasn't been returnedC.hasn't returnedD.returning5.Its recent gains in market share can be_____to price cutting efforts.A.accountedB.attributedC.accusedD.appraised6.The company is involved in leasing 216,000 trucks and providing_____services for customers.A.ableB.logisticC.eligiblermative7.His doctor suggested to him that he_____medication everyday.A.be takenB.takesC.takeD.took8.We provide the prompt,efficient and high quality service consumers expect from_____.A.ourselvesB.oursC.we9.More than anything else,a thorough and detailed plan is needed______this year's sales goals.A.to achieveB.achievementC.for achievingD.achieving10.In Korea,the gross domestic product ha increased______a3.2 percent rate in the past decade.A.atB.forC.ofD.in211.If every employee does his or her_____to ensure q quality product,this company will surely succeed.A.mostB.almostC.utmostD.mostly12.You also may ask at any time to see the request data you_____us and request correction or deletion.A.givenB.to be givenC.have givenD.have been given13._____you have already registered for the 2007 Forum,attend this free pre-forum class.A.AlthoughB.RegardingC.AsD.If14.We keep our clients informed of every_____matter influencing their rights.A.significantB.attractiveC.preva lentD.reasonable15.We_____with all laws and regulations,applied in local and international society.A.applyplyC.accountD.respond16.The shopping mall intends to_____customers by renovating the mall itself.A.contactB.attendC.attractD.meet17.The beauty of scenery in the falls gave a_____impression to us.stinglyststingsted18.Attractive compensation_____with qualifications and experience will be offered to all successfulcandidates.A.eligibleB.responsivemensurateD.adaptable19.One thing you can count on is that the stock market almost never does_____you expect it to do.A.whatB.becauseC.thatD.why20.For the past_____months they have taking care of all new statistical information in the papers.A.sevralB.lessC.anotherD.a lot21.Although the airline has cut the number of cities_____it flies to,each week several flights still makethe round trip from Cuba to Jamaica.A.whereB.whenC.thatD.what22.It is well known that employees do not contribute enough_____the plans.A.fromB.toC.withD.at23.The company plans to_____and reorganize many of its stores to eliminate overlap in jobs and officefunctions.A.closelyB.closeC.closedD.be closed24.Mr.Kelly has the same question_____the warehouse locaition which we intend to use.3A.concerningB.regardsC.with respectD.as of25.Two months ago,we were very bearish,but_____then we have switched our strategy to the bullish side.A.yetB.stillC.alreadyD.since26.The executives have repeatedly indicated the company's interest in setting up shops provided theregulatory_____are removed.A.providesB.hurdlesC.handlesD.paddles27.More than 300,00 Koreans have a net worth over $1 million,_____property.A.excludingB.excludeC.to excludeD.excluded28.We are supposed to discuss what an increasing number of people consinder to bean_____dangerous product.A.inherentlyB.inherentC.inherencyD.inherence29.The employee who worked most of his life in this division_____"Employee of the Year".A.has been awardedB.awardedC.have awardedD.is awarded30.The interviewing process we use is_____just a skills assessment,but something called behavior-basedinterviewing.A.norB.notC.asD.yet31.The president was_____for a consultant to devise a new business plan.A.arrangingB.mentioningC.referringD.looking32._____persons in the manufacturing industry are requA.OngoingB.InexperiencedC.Upcomingrming33.As soon as we_____the new assembly plant,our production capacity will almost double or even triple.A.are completedpletingC.will completeplete34.Passengers must notify airline crews in advance when carrying baggage in excess of the maximumweight_____of 60lbs.A.approvalB.allowanceC.consentD.decisively36.The consulting firm_____China as the seventh largest retail market in the world,behind the UnitedStates,Japan,the United Kingdom,Germany,France and Italy.A.ranksB.thinksC.tellsD.speaks37.Mr.Yun will supply you with the_____information required to register your product at the appliancesexposition.4A.specificB.specifiedC.specifyingD.specify38.Our consumers are very_____to quality and freshness of food.edB.contributedC.attributedD.sensitive39.When you have_____time,you'll spend it more wisely.A.littleB.lesserC.lessenD.less40.No date has been_____for a unified business tax rate.A.dealtB.notifiedC.setD.allowed41.Whether Thomas will close the deal still remains_____.A.seeB.to seenC.to be seenD.seeing42.By next year it_____necessary to double the production quota to keep up with market demands.A.wereB.will beC.has beenD.being43.At the time this session ends,all the attendees should follow the signs_____the exits on the right sideof the conference room.A.ofB.toC.throughD.for44.When customer service representatives speak to customers over the phone,they should always speak_____.A.hardlyB.clearlyC.respectablyD.respectively45.The familiarity factor is so important that two-thirds of the companies he invests in_____in theneighboring area.A.locatingB.beingC.locatedD.are located46.The_____information concerning this project will be provided for your convenience.A.specificationB.specificallyC.specificD.specify47.We can discuss it with the manager,_____not with the customer himself.A.whileB.andC.afterD.yet48.Prospective employees must have a master's degree to be eligible_____the positions described below.A.toB.forC.despiteD.about49.If our budget for office supplies_____,all new requests for them will have to be approveda case-by-casebasis.A.is exhaustingB.are exhaustingC.is exhaustedD.will be exhausted550.The company is likely to be prosecuted because it has dumped environmentally hazardous materials_____.A.illegalB.illegallyC.illegalityD.illegalizing单选题答案及详解1.B【解析】介词(in)的后面应当使用名词形式。

亚信笔试题

亚信笔试题

亚信笔试题亚信公司招聘笔试题目一、选择题(每题2分,共20分)1. 在C语言中,下列哪个选项是正确的字符串定义方式?A. char str[10] = "Hello";B. char *str = "Hello";C. char str[] = {'H', 'e', 'l', 'l', 'o', '\0'};D.以上全是2. 计算机网络中,HTTP协议通常使用哪个端口进行通信?A. 21B. 25C. 80D. 1103. 以下关于数据库事务的描述,哪一项是错误的?A. 事务具有原子性;B. 事务具有一致性;C. 事务具有持久性;D. 事务具有逆变性;4. 在软件开发过程中,哪种设计模式可以处理对象间的多对多关系?A. 单例模式B. 工厂模式C. 观察者模式D. 适配器模式5. 下列哪个算法不属于动态规划算法?A. 斐波那契数列B. 背包问题C. 最长公共子序列D. 二分查找6. 在Java中,final关键字的作用是什么?A. 声明常量B. 声明抽象方法C. 限制方法被重写D. 限制变量只能被赋值一次7. 以下哪个操作系统是开源的?A. WindowsB. MacOSC. LinuxD. Unix8. 软件工程中,哪个过程负责定义软件的功能性和非功能性需求?A. 需求分析B. 设计C. 实现D. 测试9. 在HTML中,用于插入图像的标签是什么?A. <img>B. <image>C. <picture>D. <graphic>10. 数据结构中,二叉搜索树的特点是什么?A. 节点的左子树只包含小于当前节点的数B. 节点的右子树只包含大于当前节点的数C. A和B都对D. A和B都错二、简答题(每题10分,共30分)11. 请简述面向对象编程中的三个基本特性。

亚信笔试题B卷以及答案修订稿

亚信笔试题B卷以及答案修订稿

亚信笔试题B卷以及答案WEIHUA system office room 【WEIHUA 16H-WEIHUA WEIHUA8Q8-亚信联创科技校园招聘B卷考试时间 60_分钟 _ 考试方式(闭)卷第一部分——计算机基础一、选择题(每题2分,总分40分)1.CPU状态分为目态和管态两种,什么是从目态转换到管态的唯一途径 ( D )A.运行进程修改程序状态字B.进程调度程序C.中断屏蔽D.中断2.引入多道程序设计的目的是( C )A.增强系统的用户友好性B.提高系统实用性C.充分利用CPUD. 扩充内存容量3.Windows系统是一个(B )操作系统。

A、单用户单系统B、单用户多任务C、多用户单任务D、多用户多任务4.在半导体存储器中,动态随机存储器DRAM的特点是(D )。

A、按位结构方式存储B、按字结构方式储存C、信息在储存介质中移动D、每隔一定时间进行一次刷新5.单地址指令的格式是由( B)构成。

A、操作码和操作数地址B、操作码和原操作数地址C、操作码和目的操作数地址D、操作码和下一条指令地址6.八进制数76转换为二进制数为(C )A、110111B、111101C、111110D、1111117.80486型号的微处理器能同时处理的二进制位数是(C )位。

A、8B、16C、32D、648.下面关于串的的叙述中,哪一个是不正确的(B )A.串是字符的有限序列B.空串是由空格构成的串C.模式匹配是串的一种重要运算D.串既可以采用顺序存储,也可以采用链式存储9.若串S1=‘ABCDEFG’, S2=‘9898’ ,S3=‘###’,S4=‘012345’,执行concat(replace(S1,substr(S1,length(S2),length(S3)),S3),substr(S4,index(S2,‘8’),length(S2)))其结果为()A.ABC###G0123B.ABCD###2345C.ABC###G1234D.ABCD###123410.设有两个串p 和q,其中q 是p 的子串,求q 在p 中首次出现的位置的算法称为(C )A.求子串 B.联接 C.匹配 D.求串长11. 下列字符中,ASCII码值最大的是 ( D )。

2015百度校园招聘电话面试及答案和互联网面试笔试知识点总结

2015百度校园招聘电话面试及答案和互联网面试笔试知识点总结

自我介绍的时间三分钟自我介绍如果面试官没有特别强调,那么自我介绍的时间3分钟最合适。

你可以根据自我介绍的四部分内容,这样分配时间:第一分钟主要介绍自己的姓名、年龄、学历、专业特长、实践经历等;第二分钟主要介绍个人业绩,应届毕业生可着重介绍相关的在校活动和社会实践的成果;第三分钟可谈谈对应聘职位的理想和对本行业的看法。

通常情况下,每分钟180到200字之间的语速是比较合适的。

这样的语速可以让对方感到舒服,同时也能更加有效地传递信息,增加面试官对你的印象分。

一分钟自我介绍有时候,面试官会规定自我介绍的时间,你应该怎样应对呢? 面试官规定的自我介绍时间缩短,如“做一个1分钟的自我介绍”。

遇到这种情况,你可以精选事先准备的3分钟自我介绍内容,突出“做成过什么”,展现你与应聘职位相关的能力。

百度实习生电面1、模拟扑克牌发牌,例如1-54代表每张牌,保证每个数字都出现一次,但是顺序随机答:把54张牌存到大小为54的数组中,首先产生1-54中的一个随机数,取以该随机数为下标的牌发出来,并用最后一张牌(第54张)占据该位置,然后产生1-53中的以随机数,取以该随机数为下标的牌发出来,并用最后一张牌(第52张)占据该位置;以此类推,直到发完所有牌。

2. 有36匹马,1个跑道,每个跑道跑6匹,没有秒表,要比多少次能比出前3名,答案是8次,自己摸索。

答:每组单独跑决出每组的第一名啊然后每组的第一名在决出123 这样一共是7次吧最后就是第一名那组的23名和第2名那组的12 还有第三名那匹马一起比决出2 3名就这样啊3. 用百度搜索的时候,想除去那些网址不同,但是网页内容相同的地址,怎么做?怎么判断网页内容相同?答:判断网页内容是否相同的方法,可用于搜索引擎技术领域,过滤网页内容相同的查询结果。

根据计算网页标题的相似度和网页正文内容的相似度,根据网页的标题和正文内容的相似度来判断其是否为相同内容。

如果二者的相似度达到一定阀值,那么就判定为相同内容的网页,否则就判定为不同内容的网页。

《@经典文档》2015年中国电信校园招聘考试试题(附答案)

《@经典文档》2015年中国电信校园招聘考试试题(附答案)

2015年中国电信宁夏公司校园招聘考试试题(附答案)注意事项:1.本次考试是对考生综合能力的测试。

请仔细资料,按要求作答。

2.本试题考试时限为120分钟,满分100分。

3.答题前,考生应用黑色签字笔或钢笔将自己的姓名、准考证号填写清楚,用2B铅笔将准考证号所选项涂黑。

用黑色签字笔或钢笔在答题卡规定答题区域内作答,超出答题区域的作答无效。

4.监考人员宣布考试结束时,考生应立即停止作答,将试题本、答题卡和草稿纸都留在桌上,待监考人员允许后,方可离开。

第一部分常识判断下面题目中只有一个正确答案,请将正确答案的序号填入题内括号内1.在我国,( D )是解决社会主要矛盾的根本途径.A.切实加强党的领导B.确保公有制经济的主导地位C.走共同富裕之路D.大力发展社会生产力2.下列金属中,属于液体的是.( A )A. 汞B. 银C. 镁D. 铝3.与复印机、激光打印机一起构成现代化的光电子印刷技术,从而彻底取代了铅字手工排版的是.( C )A. 打字机B. 计算机C. 激光照排机D. 激光印刷机4.度是指( C ).A.事物的规模.程序和速度等可以用数量表示的规定性B.一事物区别于他事物的内在规定性C.保持自己质的数量界限,是质和量的统一D.事物保持自己存在的方面5.把可直接感知的某种具体实物看做是世界的本源,这种观点属于( A ).A.朴素唯物主义B.形而上学唯物主义C.辩证唯物主义D.庸俗唯物主义6.建立在广泛的社会分工基础上的真正独立的业缘关系是.( A )A. 随着阶级社会的产生而形成和发展起来的B. 在自然分工的基础上形成的C. 在原始社会就存在的D. 人类社会俱来的7.真理的客观性是指.( B )A. 它是独立于人们意识之外的客观实在。

B. 它的内容不依赖于人、不依赖于主体和不依赖人类C. 它是自然界规律D. 它是社会规律。

8.“黑洞”是科学家首先从理论上进行预言的.( C )A. 引力场B. 视界C. 特殊天体D. 脉冲星9.食盐放在空气中会.( B )A. 风化B. 潮解C. 结晶D. 溶解10.文明世界的赵州桥是( B )时修建的。

亚信校园招聘笔试题

亚信校园招聘笔试题

亚信科技2008年度校园招聘笔试院校名:系别:专业:姓名:性别:应聘地点:□长春□呼和浩特(请选择)手机:Part 1: 个性调查1.T 业分很多门类,按行业分比如软件、电子通信、系统集成等,以软件为例,具体又可以细分为开发、测试、售前方案、咨询等多种。

请描述本人的个性和技术方面的兴趣特长,并结合自己的兴趣为自己设定一个发展目标(简而言之,就是自我感觉在IT业更适合从事什么方面的工作)。

2.请如实回答下面问题。

以下测试仅为表现一个人的个性,无标准答案,仅供参考1) 要是你与同事由于一些问题产生了矛盾,关系紧张起来,这时你将怎么办?A.他若不理我,我也不理他;他若主动前来招呼我,那么我也招呼他。

B.请别人帮助,调解我们之间的紧张关系。

C.从此不再搭理他,并设法报复他。

D.我将主动去接近对方,争取消除矛盾。

2) 如果你被别人错误地认定为干过某一件不好的事情,你将怎么办?A.找这些乱说的人对质,指责他们。

B.同样捏造一些莫须有的事加在对方身上,进行报复。

C.置之一笑,不去理睬,让时间来证明自己的清白。

D.要求组织上调查,以弄清事实真相。

3) 如果你的两个领导人之间关系紧张,你将怎么办?A.哪一边得势就倒向哪一边。

B.采取不介入态度,明哲保身,不得罪任何人。

C.哪一个领导人正确就站在哪一边,态度明确。

D.努力调解两位领导人之间的矛盾。

4) 如果你的好朋友和你发生了严重的意见分歧,你将怎么办?A.暂时避开这个问题,以后再说,以求同存异。

B.请与我和他都亲近的第三者来裁决谁是谁非。

C.为了友谊,迁就对方,放弃自己的观点。

D.下决心中断我们之间的朋友关系。

5) 当别人妒嫉你所取得的成绩时,你将怎么办?A.以后再也不冒尖了,免得被人妒嫉。

B.走自己的路,不管别人持什么态度看待我。

C.同这些妒嫉者争吵,保护自己的名誉。

D.一如即往地工作,但同时注意反省自己的行为。

6) 如果工作需要你去处理某一件事,而处理这件事的结果不是得罪甲,就是得罪乙,而甲和乙恰恰又都是你的好朋友,你将怎么办?A.向甲和乙讲明这件事的性质,想办法取得他们的谅解,再处理这件事情。

亚信笔试题正常-推荐下载

亚信笔试题正常-推荐下载
6、 下列方法定义中,不正确的是 D A public int x( ){…} B public static int x(double y){…} C void x (double d){…} D public static x (double a){…}
7、 下列的哪个选项可以正确表达八进制 8 C A 0x8 B 0x10 C 08
11、Given: F 1 public class Alphal{ 2 public static void main(String[] args){ 3 boolean flag; int i=0; 1 do{ 2 flag = false; 3 system.out.println(i++); 4 flag = 1 < 10 5 continue; 6 }while((flag)?True;false); 7} 8}
对全部高中资料试卷电气设备,在安装过程中以及安装结束后进行高中资料试卷调整试验;通电检查所有设备高中资料电试力卷保相护互装作置用调与试相技互术关,系电通,力1根保过据护管生高线产中0不工资仅艺料可高试以中卷解资配决料置吊试技顶卷术层要是配求指置,机不对组规电在范气进高设行中备继资进电料行保试空护卷载高问与中题带资2负料2,荷试而下卷且高总可中体保资配障料置各试时类卷,管调需路控要习试在题验最到;大位对限。设度在备内管进来路行确敷调保设整机过使组程其高1在中正资,常料要工试加况卷强下安看与全22过,22度并22工且22作尽22下可护都能1关可地于以缩管正小路常故高工障中作高资;中料对资试于料卷继试连电卷接保破管护坏口进范处行围理整,高核或中对者资定对料值某试,些卷审异弯核常扁与高度校中固对资定图料盒纸试位,卷置编工.写况保复进护杂行层设自防备动腐与处跨装理接置,地高尤线中其弯资要曲料避半试免径卷错标调误高试高等方中,案资要,料求编试技5写、卷术重电保交要气护底设设装。备备置管4高调、动线中试电作敷资高气,设料中课并技3试资件且、术卷料中拒管试试调绝路包验卷试动敷含方技作设线案术,技槽以来术、及避管系免架统不等启必多动要项方高方案中式;资,对料为整试解套卷决启突高动然中过停语程机文中。电高因气中此课资,件料电中试力管卷高壁电中薄气资、设料接备试口进卷不行保严调护等试装问工置题作调,并试合且技理进术利行,用过要管关求线运电敷行力设高保技中护术资装。料置线试做缆卷到敷技准设术确原指灵则导活:。。在对对分于于线调差盒试动处过保,程护当中装不高置同中高电资中压料资回试料路卷试交技卷叉术调时问试,题技应,术采作是用为指金调发属试电隔人机板员一进,变行需压隔要器开在组处事在理前发;掌生同握内一图部线纸故槽资障内料时,、,强设需电备要回制进路造行须厂外同家部时出电切具源断高高习中中题资资电料料源试试,卷卷线试切缆验除敷报从设告而完与采毕相用,关高要技中进术资行资料检料试查,卷和并主检且要测了保处解护理现装。场置设。备高中资料试卷布置情况与有关高中资料试卷电气系统接线等情况,然后根据规范与规程规定,制定设备调试高中资料试卷方案。

亚信校招笔试题目

亚信校招笔试题目

public class BSTMinLength {public static void main(String[] args) {TreeNode tNode11 = new TreeNode(10, null, null);TreeNode tNode12 = new TreeNode(50, null, null);TreeNode tNode13 = new TreeNode(5, null, null);TreeNode tNode14 = new TreeNode(30, null, null);TreeNode tNode21 = new TreeNode(30, tNode11, tNode12);TreeNode tNode22 = new TreeNode(30, tNode13, tNode14);TreeNode tNodeRoot = new TreeNode(100, tNode21, tNode22); System.out.println(minlength(tNodeRoot));}private static int minlength(TreeNode tNode){if (tNode != null) {return getlength(tNode,0);}return -1;}private static int getlength(TreeNode tNode,int curLength) {int minLeft=-1;int minRight=-1;if (tNode.leftNode!=null){minLeft=getlength(tNode.leftNode, curLength+tNode.value); }if (tNode.rightNode!=null) {minRight=getlength(tNode.rightNode, curLength+tNode.value); }if (tNode.leftNode==null && tNode.rightNode==null) {return curLength+tNode.value;if (tNode.leftNode==null) {return minRight;}if (tNode.rightNode==null) {return minLeft;}return minLeft>minRight? minRight:minLeft;}}class TreeNode {int value;TreeNode leftNode;TreeNode rightNode;TreeNode(int value, TreeNode lefeNode, TreeNode rightNode) { this.value = value;this.leftNode = lefeNode;this.rightNode = rightNode;}}2.lru#include <iostream>using namespace std;int lruCountMiss(int max_cache_size, int *pages, int len){int count = 0;int i,j,k,n;bool flag = false;int *a = new int[max_cache_size];//初始化高速缓存数组for(i = 0; i < max_cache_size; i++){a[i] = -1;}for(j= 0; j < len; j++){for(i = 0; i < max_cache_size; i++){if(pages[j] != a[i]){continue;}else{break;}}if(i != max_cache_size){for(k = i; k < max_cache_size; k++){if(a[k] == -1){flag = true;break;}}if(!flag){for(n = i; n < max_cache_size - 1; n++)a[n] = a[n+1];}a[max_cache_size - 1] = pages[j];}else{flag = false;for(n = i; n < k - 1; n++){a[n] = a[n+1];}a[k - 1] = pages[j];}}else{count ++;for(i = 0; i < max_cache_size; i++){if(a[i] == -1){a[i] = pages[j];flag = true;break;}}if(!flag){for(i = 0; i < max_cache_size-1; i++)a[i] = a[i+ 1];}a[max_cache_size - 1] = pages[j]; }elseflag = false;}}return count;}int main(){int arr[] = {7, 0, 1, 2, 0, 3, 0, 4};cout << lruCountMiss(3, arr, 8) << endl; return 0;}3.反转链表lnode *reverse(lnode *head){if(head){lnode *prev = NULL;lnode *curr = head;lnode *next = curr->next;curr->next = prev;while(next != NULL){prev = curr;curr = next;next = next->next;curr->next = prev;}return curr;}else{return head;}};lnode *reverseLinkedList(lnode *list){if(list){lnode *ori = list;lnode *half = list;lnode *prev = list;while(list && half && half->next){prev = list;list = list->next;half = half->next;if(half){half = half->next;}}if(list){prev->next = reverse(list);}return ori;}return list;}4. SJFfloat waitingTimeSJF(int * requestTimes, int * durations,int n){ int *flags = new int[n];float sums = 0;for(int i = 0 ;i< n; i++){flags[i] = -1;}int nowtime = 0;for( int i = 0; i< n; i++ ){int count = 0;for(int k = 0; k< n;k++){if(count == 0){if(requestTimes[k] <= nowtime && durations[k] >=0 ){ flags[count++] = k;}}else{if(durations[k] >=0 && requestTimes[k] <= nowtime ){ if( durations[k] < durations[flags[0]]){count = 1;flags[0] = k;}else if( durations[k] == durations[flags[0]] ){flags[count++] = k;}}}}if(count == 0){count = 1;for(int j = 0; j< n ;j++){if(durations[j] >=0 ){flags[0] = j;nowtime = requestTimes[j];}}}int idx = flags[0];int minreq = requestTimes[ flags[0] ];int mindrus = durations[idx];if(count > 1){for(int j = 1; j < count ;j++){if(requestTimes[flags[j]] < minreq ){ minreq =requestTimes[flags[j]]; idx = flags[j];}}}sums += nowtime - requestTimes[idx];nowtime += durations[idx];requestTimes[idx] = -1;durations[idx] = -1;}return sums/n;}5 无向连通判断是否为树#include<stdio.h>#include<stdlib.h>#include<string.h>const int N=10000, M=100000;bool edge[N][N]; // 数组记录两点是否存在边bool visit[N]; // 标记该节点是否访问过bool DFS_check(int x, int y=-1) {if (visit[x])return false;visit[x] = true;int i;for (i=0;i<N;i++)if (edge[x][i] && i!=y)if (visit[i])return false;elseif (!DFS_check(i, x))return false;return true;}int main(){int n,m;scanf("%d%d",&n,&m);memset(edge,false,sizeof(edge)); int i,x,y;for (i=0;i<m;i++){scanf("%d%d",&x,&y);edge[x-1][y-1] = true;edge[y-1][x-1] = true;}memset(visit,false,sizeof(visit)); bool result = DFS_check(0);if (result)for (i=0;i<n;i++)if (!visit[i])result = false;if (result)printf("Yes!\n");elseprintf("No!\n");system("pause");return 0;}6. 老鼠奶酪#include <iostream>using namespace std;int isPath(int **grid, int m, int n);struct _TraversedNode{int x;int y;_TraversedNode *next;};struct _Node{int x;int y;};int main(int argc, const char * argv[]){int **grid= new int*[8];for(int i=0;i<8;i++){grid[i]= new int[8];}grid[0][0]=1; grid[0][1]=1; grid[0][2]=0; grid[0][3]=0; grid[0][4]=0; grid[0][5]=0; grid[0][6]=0; grid[0][7]=1;grid[1][0]=1; grid[1][1]=1; grid[1][2]=1; grid[1][3]=1; grid[1][4]=1; grid[1][5]=1; grid[1][6]=1; grid[1][7]=1;grid[2][0]=1; grid[2][1]=0; grid[2][2]=0; grid[2][3]=0; grid[2][4]=1; grid[2][5]=0; grid[2][6]=0; grid[2][7]=1;grid[3][0]=1; grid[3][1]=1; grid[3][2]=1; grid[3][3]=0; grid[3][4]=1; grid[3][5]=0; grid[3][6]=0; grid[3][7]=1;grid[4][0]=0; grid[4][1]=1; grid[4][2]=0; grid[4][3]=0; grid[4][4]=1; grid[4][5]=1; grid[4][6]=1; grid[4][7]=1;grid[5][0]=0; grid[5][1]=1; grid[5][2]=0; grid[5][3]=0; grid[5][4]=0; grid[5][5]=0; grid[5][6]=0; grid[5][7]=1;grid[6][0]=0; grid[6][1]=1; grid[6][2]=0; grid[6][3]=9; grid[6][4]=1; grid[6][5]=1; grid[6][6]=1; grid[6][7]=1;grid[7][0]=0; grid[7][1]=1; grid[7][2]=1; grid[7][3]=1; grid[7][4]=0; grid[7][5]=0; grid[7][6]=1; grid[7][7]=0;for(int i=0;i<8;i++){for(int j=0;j<8;j++)cout<<grid[i][j]<<" ";;cout<<endl;}return isPath(grid,8,8);}int isPath(int **grid, int m, int n){if(grid[0][0]==0) return 0;if(grid[0][0]==9) return 1;int step=0;bool flag_down_success=true;bool flag_up_success=true;bool flag_left_success=true;bool flag_right_success=true;_TraversedNode *p=NULL;_TraversedNode *p_check=NULL;_TraversedNode *head=NULL;_TraversedNode *TraversedNode = new _TraversedNode;TraversedNode->x=0;TraversedNode->y=0;head=TraversedNode;p=TraversedNode;p->next=NULL;int count_node=0;int num_node=1;_Node *node=new _Node[n+m];_Node *node_next=new _Node[n+m];node[0].x=0;node[0].y=0;while(1){for(int i=0;i<num_node;i++){if(node[i].x+1<=m-1){if(grid[node[i].x+1][node[i].y]!=0){if(grid[node[i].x+1][node[i].y]==9){step++;cout<<"可以最短"<<step<<"步到达终点"<<endl;return 1;}p_check=head;while(p_check!=NULL){if((p_check->x==node[i].x+1)&&(p_check->y==node[i].y)) {p_check=NULL;flag_down_success=false;}else{p_check=p_check->next;}}if(flag_down_success){TraversedNode=new _TraversedNode;TraversedNode->x=node[i].x+1;TraversedNode->y=node[i].y;p->next=TraversedNode;p=TraversedNode;p->next=NULL;node_next[count_node].x=node[i].x+1;node_next[count_node].y=node[i].y;count_node++;}flag_down_success=true;}}if(node[i].x-1>=0){if(grid[node[i].x-1][node[i].y]!=0){if(grid[node[i].x-1][node[i].y]==9){step++;cout<<"可以最短"<<step<<"步到达终点"<<endl;return 1;}p_check=head;while(p_check!=NULL){if((p_check->x==node[i].x-1)&&(p_check->y==node[i].y)) {p_check=NULL;flag_up_success=false;}else{p_check=p_check->next;}}if(flag_up_success){TraversedNode=new _TraversedNode; TraversedNode->x=node[i].x-1;TraversedNode->y=node[i].y;p->next=TraversedNode;p=TraversedNode;p->next=NULL;node_next[count_node].x=node[i].x-1; node_next[count_node].y=node[i].y; count_node++;}flag_up_success=true;}}if(node[i].y+1<=n-1){if(grid[node[i].x][node[i].y+1]!=0){if(grid[node[i].x][node[i].y+1]==9){step++;cout<<"可以最短"<<step<<"步到达终点"<<endl;return 1;}p_check=head;while(p_check!=NULL){if((p_check->x==node[i].x)&&(p_check->y==node[i].y+1)) {p_check=NULL;flag_right_success=false;}else{p_check=p_check->next;}}if(flag_right_success){TraversedNode=new _TraversedNode;TraversedNode->x=node[i].x;TraversedNode->y=node[i].y+1;p->next=TraversedNode;p=TraversedNode;p->next=NULL;node_next[count_node].x=node[i].x;node_next[count_node].y=node[i].y+1;count_node++;}flag_right_success=true;}}if(node[i].y-1>=0){if(grid[node[i].x][node[i].y-1]!=0){if(grid[node[i].x][node[i].y-1]==9){step++;cout<<"可以最短"<<step<<"步到达终点"<<endl;return 1;}p_check=head;while(p_check!=NULL){if((p_check->x==node[i].x)&&(p_check->y==node[i].y-1)) {p_check=NULL;flag_left_success=false;}else{p_check=p_check->next;}}if(flag_left_success){TraversedNode=new _TraversedNode;TraversedNode->x=node[i].x;TraversedNode->y=node[i].y-1;p->next=TraversedNode;p=TraversedNode;p->next=NULL;node_next[count_node].x=node[i].x; node_next[count_node].y=node[i].y-1; count_node++;}flag_left_success=true;}}}if(count_node==0){cout<<"不存在到达终点的路径"<<endl;return 0;break;}step++;num_node=count_node;count_node=0;for(int i=0;i<num_node;i++){node[i].x=node_next[i].x;node[i].y=node_next[i].y;cout<<"("<<node[i].x<<","<<node[i].y<<") "; }cout<<endl;}}7.格雷码import java.util.Scanner;public static int gray(byte term1,byte term2){int n=0;for(int i=0;i<8;i++){byte t1,t2,ch;ch = (byte)0x01;t1=term1&ch;t2=term2&ch;if((t1^t2)==ch){n++;}term1=(byte)(term1>>1);term2=(byte)(term>>1);}if(n==1)return 1;elsereturn0;}8.#include <iostream>using namespace std;void myPrint(int n){if(1 == n){cout << "1*2" <<endl;return;}int lastnumber = n*(n+1);//每一行最后一个数int first=1;//每一行第一个数int num=1;int step=n;for(int i=1;i<=n;i++){for(int j=1;j<i;j++)//输出‘-’cout<<'-';num = first;for(int l=0;l<(n-i+1);l++)//每一行的前半部分{cout << num << "*";num++;}num = lastnumber - step+1;cout << num ;num++;for( l=0;l<(n-i);l++)//每一行的后半部分{cout << "*"<<num;num++;}cout << endl;//修改first和lastnumberfirst = first+step;lastnumber = lastnumber - step;step--;}}int main(){int n;while(cin>>n){myPrint(n);}return 0;}9短作业优先调度算法(SJF)public class ShortJobFirst {public static void main(String[] args) {int[] requestTimes = {0, 2, 4, 5};int[] durations = {7, 4, 1, 4};float averageWaitingTime = ShortJobFirst.minWaitingTime(requestTimes, durations);System.out.println(averageWaitingTime);}/**** @param requestTimes 任务提交时间* @param durations 任务服务时间* @return*/public static float minWaitingTime(int[] requestTimes, int[] durations) {if(requestTimes == null || durations == null)return -1;if(requestTimes.length != durations.length)return -1;int n = requestTimes.length;int[] durationTimes = copyArray(durations); // 复制一份服务时间int[] startTimes = new int[n]; // 开始时间int[] endTime = new int[n]; // 结束时间int[] waitingTime = new int[n]; // 等待时间int[] cycleTime = new int[n]; // 周转时间// 第一个执行任务的开始时间、结束时间、等待时间startTimes[0] = requestTimes[0];endTime[0] = startTimes[0] + durations[0];waitingTime[0] = 0;/** 核心代码 **/int lastIndex = 0; // 上一次执行任务的索引int minIndex = 0; // 最短任务的索引for(int i = 1; i < n; i++) {minIndex = getMinIndex(durations); // 作曲最短任务索引为当前任务startTimes[minIndex] = endTime[lastIndex]; // 当前任务的开始时间为上一个任务的结束时间endTime[minIndex] = startTimes[minIndex] + durationTimes[minIndex]; // 结束时间 = 开始时间 + 服务时间waitingTime[minIndex] = startTimes[minIndex] - requestTimes[minIndex]; // 等待时间 = 开始时间 - 提交时间cycleTime[minIndex] = endTime[minIndex] - requestTimes[minIndex]; // 周转时间 = 结束时间 - 提交时间lastIndex = minIndex; // 更新当前任务索引为下一次循环中的“上一次任务索引”}// 计算平均等待时间int s = 0;for(int i : waitingTime)s += i;float averageTime = (float) s / (float) n;return averageTime;}// 获取最短任务索引,获取完成之后,该任务的服务时间置为最大值,从下一次寻找最短任务的过程中排除。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

亚信科技2015校园招聘考试时间120_分钟_ 考试方式(闭)卷第一部分——JAVA语言基础一、单选题(每题2分,总分16分)1.下列java标识符,错误的是( )。

A _$userNameB $userNameC USER_NAMED 1userName2.三元条件运算符ex1?ex2:ex3,相当于下面( )语句。

A if(ex1)ex3;else ex2;B if(ex2)ex1;else ex3;C if(ex1)ex2;else ex3;D if(ex3)ex2;else ex1;3.下列不属于面向对象编程的三个特征的是( )。

A. 封装B. 指针操作C. 多态性D. 继承4.关于构造方法,下列说法错误的是( )。

A. 构造方法不可以进行方法重写B. 构造方法用来初始化该类的一个新的对象C. 构造方法具有和类名相同的名称D. 构造方法不返回任何数据类型5.关于java线程,下面说法错误的是( )。

A 线程是以CPU为主体的行为B 新线程一旦被创建,它将自动开始运行C 创建线程的方法有两种:实现Runnable接口和继承Thread类D java利用线程使整个系统成为异步6.在Java中,一个类可同时定义许多同名方法,这些方法的形式参数个数、类型或顺序各不相同,传回的值也可以不同。

这种面向对象程序的特征称为( )。

A 重载B 隐藏C 覆盖D Java不支持该特性7.有以下方法的定义,该方法的返回类型是( )。

ReturnType method(byte x, double y) {return (short)x/y*2;}A、doubleB、intC、shortD、byteE、float8.以下声明中,错误的是( )。

A、float f = 1.2;B、float f = 1.2f;C、float f = (float)1.2;D、float f =1;二、填空题(每题2分,总分14分)1.我们在java程序中,把关键字____ ____加到方法名称的前面,来实现子类调用父类的方法。

abstract方法___ _____(能或不能)与final并列修饰同一个类。

2.定义int i=23;int j = 3 & ++i;语句的执行完后i= ,j= 。

3.下列方法method()执行,返回值是,输出是。

public int method1(){int num=10;try{if(num<20){System.out.print("num is 10.");return num;}num=40;}catch(Exception e){System.out.print("num is 50.");num = 50;}finally{num=60;System.out.print("num is 60.");}return num;}4.网络通信有两种方式,分别为和。

5.通过JDBC查询数据库有7个步骤:载人JDBC驱动器、定义连接的网址URL、建立连接、建立声明对象、、处理结果、___ __。

6.有如下程序段:int total=0;for(int i=0;i<4;i++) {if(i==1)continue;if(i==2)break;total +=i;}则执行完该程序段后total的值为___ __。

7.有以下代码片段:String str1 = "hello";String str2 = "he" + new String("llo");System.out.println(str1 == str2);请问输出的结果是:___ __。

三、编程题(前两题6分,第三题8分)1.请补充程序完成正整数分解质因数的算法(提示,从最小质数开始分解,分解的结果再从最小质数进行分解,如90=2*45=2*(3*15)=2*3*(3*5))。

static void main(String[] args){int inum = Integer.parseInt(args[0]);//inum就是要分解的整数String strResult = “””;System.out.println(strResult);//输出分解结果,如2*3*3*5}2.在10000到99999种的数字中,找到AABCC(如11233)类型的所有数字。

3.有50个学生,共有5门选修课(名字分别为选课1、选课2、选课3、选课4、选课5),每个学生有3门课的成绩。

从文件(/tmp/source.txt)中读取相关数据(文件格式一个学生一行,姓名;课程名称1,课程成绩1,课程名称2,课程成绩2;课程名称3,课程5),计算出每门功课的选修人数、考试人数、平均成绩和及格率(60分及格)并写入文件(/tmp/result.txt)中(文件格式,一门课一行,一行格式为课程名称、选修人数、考试人数、平均成绩、及格率)。

备注:如果记不清IO的相关类,可以写伪代码,学生有可能有缺考的情况(成绩为NULL或者空),每个。

第二部分——数据库基础一、单选题(每题2分,总分40分)1.数据库的基本特点是( )。

A.(1)数据可以共享(或数据结构化) (2)数据独立性(3)数据冗余大,易移植(4)统一管理和控制B.(1)数据可以共享(或数据结构化) (2)数据独立性(3)数据冗余小,易扩充(4)统一管理和控制C.(1)数据可以共享(或数据结构化) (2)数据互换性(3)数据冗余小,易扩充(4)统一管理和控制D.(1)数据非结构化(2)数据独立性(3)数据冗余小,易扩充(4)统一管理和控制2.数据库的特点之一是数据的共享,严格地讲,这里的数据共享是指( )。

A.多个应用中的多个程序共享一个数据集合B.多个用户、同一种语言共享数据C.多个用户共享一个数据文件D.A、B、C均是3.在数据库中,产生数据不一致的根本原因是( )。

A.数据存储量太大B.没有严格保护数据C.未对数据进行完整性控制D.数据冗余4.数据库管理系统能实现对数据库中数据的查询、插入、修改和删除等操作,这种功能称为( )。

A.数据定义功能B.数据管理功能C.数据操纵功能D.数据控制功能5.在表中创建列时,必须为其指定数据类型,列的数据类型决定了数据的取值、范围和( )格式。

A、逻辑B、查找C、存储D、创建6.在Oracle中,有一个教师表teacher的结构如下:ID NUMBER(5)NAME V ARCHAR2(25)EMAIL V ARCHAR2(50)下面哪个语句显示没有Email地址的教师姓名( )。

A、SELECT name FROM teacher WHERE email = NULL;B、SELECT name FROM teacher WHERE email <> NULL;C、SELECT name FROM teacher WHERE email IS NULL;D、SELECT name FROM teacher WHERE email IS NOT NULL;7.在基本SQL语言中,不可以实现( )。

A. 定义外键约束B.定义与查询修改视图C.修改表结构D.内存数据刷新8.以下不属于DDL语句的是( )。

A、CREATEB、ALTERC、DELETED、DROP9.Oracle中返回昨天日期的函数(语句)是( )。

A、sysdate-1B、last_dayC、next_dayD、day_between10.下图所示的E-R图转换成关系模型,可以转换为( )个关系模式。

A、1个B、2个C、3个D、4个11.JDBC中,用于表示数据库连接的对象是( )。

A、ConnectionB、StatementC、DriverManagerD、PreparedStatement12.使用SQL语句进行分组检索时,为了去掉不满足条件的分组,应当( )。

A、在GROUP BY后面使用HA VING子句B、使用WHERE子句C、先使用WHERE子句,再使用HA VING子句D、先使用HA VING 子句,再使用WHERE子句13.在Oracle数据库的逻辑结构中有以下组件:A,表空间B,数据块C,区D,段这些组件从大到小一次是( )。

A、A->B->C->DB、A->D->C->BC、A->C->B->DD、D->A->C->B14.假定有一张表用户表users,其中一身份证字段ID_card。

为了维护数据的完整性,在设计数据库时,最好对ID_card 字段添加约束,请问应该添加什么约束?( )A、uniqueB、checkC、defaultD、primary key15.如果要修改表TD_M_STAFF,对列STAFF_ID 增加一个主键约束,当前表为空。

哪个语句能完成这个任务?( )A、ALTER TABLE td_m_staff ADD CONSTRAINT stud_id_pk PRIMARYKEY(staff_id);B、A LTER TABLE td_m_staff ADD PRIMARY KEY staff_id;C、A LTER TABLE td_m_staff ADD CONSTRAINT PRIMARY KEY (staff_id);D、ALTER TABLE td_m_staff ADD CONSTRAINT stud_id_pk PRIMARY KEY staff_id;16.设有关系表EMP(职工号,姓名,年龄,技能),假设职工号唯一,每个职工有多项技能,则EMP表的主键是( )。

A、职工号B、姓名,技能C、职工号,技能D、技能17.执行下面的语句:select e.ename,d.dname from employees e, deptment d where e.deptno (+) = d.deptno;会显示什么样的结果?( )A、显示deptment表的全部信息,没有对应员工以null代替B、显示employees表的全部信息,没有对应部门以null代替C、报错D、语法正确,但不会运行18.下列那些说法是正确的( ) 。

A、在一个关系表中,主键可唯一标识一行记录B、一个事务中的某条SQL命令提交时,其它SQL命令可以不提交C、一个关系表中的外键必定是另一表中的主键D、回滚可以在事务失败时,回到操作事务前的数据状态19.表employee中有下列字段:name、department、phone_number,下面哪些操作可以限制人们对phone_number字段的访问?( )A、收回对phone_number字段的访问权限,使用视图来访问表B、在phone_number字段创建索引C、在表中使用check约束D、在表中使用参照完整性约束20.精妙绝伦执行以下查询语句:SELECT empno, empname FROM emp WHERE empno = 7782 OR empno = 7876;在WHERE语句中,以下哪个操作符可以取代OR?( )A、BETWEENB、HA VINGC、LIKED、IN第四部分——创新能力1.请写出铅球的五种以上的用途。

相关文档
最新文档