ImageVerifierCode 换一换
格式:DOCX , 页数:30 ,大小:29.52KB ,
资源ID:17868737      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/17868737.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(浙江大学机试真题Word格式.docx)为本站会员(b****3)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

浙江大学机试真题Word格式.docx

1、s grade will be the average of G1 and G2. If the difference exceeds T, the 3rd expert will give G3. If G3 is within the tolerance with either G1 or G2, but NOT both, then this problems grade will be the average of G3 and the closest grade. If G3 is within the tolerance with both G1 and G2, then this

2、 problems grade will be the maximum of the three grades. If G3 is within the tolerance with neither G1 nor G2, a judge will give the final grade GJ. Each input file may contain more thanone test case. Each case occupies a line containing six positive integers: P, T, G1, G2, G3, and GJ, as described

3、in the problem. It is guaranteed that all the grades are valid, that is, in the interval 0, P.输出 For each test case you should output the final grade of the problem in a line. The answer must be accurate to 1 decimal place.20 2 15 13 10 1814.02010年浙江大学计算机及软件工程研究生机试真题 1003: A+B给定两个整数A和B,其表示形式是:从个位开始,

4、每三位数用逗号,隔开。现在请计算A+B的结果,并以正常形式输出。输入包含多组数据数据,每组数据占一行,由两个整数A和B组成(-109 A,B 109)。请计算A+B的结果,并以正常形式输出,每组数据占一行。-234,567,890 123,456,7891,234 2,345,678-11111110123469122011年浙江大学计算机及软件工程研究生机试真题 1004: Median Given an increasing sequence S of N integers, the median is the number at the middle position. For exam

5、ple, the median of S1=11, 12, 13, 14 is 12, and the median of S2=9, 10, 15, 16, 17 is 15. The median of two sequences is defined to be the median of the non-decreasing sequence which contains all the elements of both sequences. For example, the median of S1 and S2 is 13. Given two increasing sequenc

6、es of integers, you are asked to find their median. Each input file maycontain more than Each case occupies 2 lines, each gives the information of a sequence. For each sequence, the first positive integer N (1000000) is the size of that sequence. Then N integers follow, separated by a space. It is g

7、uaranteed that all the integers are in the range of long int. For each test case you should output the median of the two given sequences in a line.4 11 12 13 145 9 10 15 16 17132011年浙江大学计算机及软件工程研究生机试真题 1005: Graduate Admission It is said that in 2011, there are about 100 graduate schools ready to pr

8、oceed over 40,000 applications in Zhejiang Province. It would help a lot if you could write a program to automate the admission procedure. Each applicant will have to provide two grades: the national entrance exam grade GE, and the interview grade GI. The final grade of an applicant is (GE + GI) / 2

9、. The admission rules are: The applicants are ranked according to their final grades, and will be admitted one by one from the top of the rank list. If there is a tied final grade, the applicants will be ranked according to their national entrance exam grade GE. If still tied, their ranks must be th

10、e same. Each applicant may have K choices and the admission will be done according to his/her choices: if according to the rank list, it is ones turn to be admitted; and if the quota of ones most preferred shcool is not exceeded, then one will be admitted to this school, or ones other choices will b

11、e considered one by one in order. If one gets rejected by all of preferred schools, then this unfortunate applicant will be rejected. If there is a tied rank, and if the corresponding applicants are applying to the same school, then that school must admit all the applicants with the same rank, even

12、if its quota will be exceeded.输入 Each input file may contain more than one test case. Each case starts with a line containing three positive integers: N (40,000), the total number of applicants; M (100), the total number of graduate schools; and K (5), the number of choices an applicant may have. In

13、 the next line, separated by a space, there are M positive integers. The i-th integer is the quota of the i-th graduate school respectively. Then N lines follow, each contains 2+K integers separated by a space. The first 2 integers are the applicants GE and GI, respectively. The next K integers repr

14、esent the preferred schools. For the sake of simplicity, we assume that the schools are numbered from 0 to M-1, and the applicants are numbered from 0 to N-1. For each test case you should output the admission results for all the graduate schools. The results of each school must occupy a line, which

15、 contains the applicants numbers that school admits. The numbers must be in increasing order and be separated by a space. There must be no extra space at the end of each line. If no applicant is admitted by a school, you must output an empty line correspondingly.11 6 32 1 2 2 2 3100 100 0 1 260 60 2

16、 3 5100 90 0 3 490 100 1 2 090 90 5 1 380 90 1 0 280 80 0 1 280 70 1 3 270 80 1 2 3100 100 0 2 40 1035 6 72 81 42010年浙江大学计算机及软件工程研究生机试真题 1006: ZOJ问题对给定的字符串(只包含z,oj三种字符),判断他是否能AC。是否AC的规则如下:1. zoj能AC;2. 若字符串形式为xzojx,则也能AC,其中x可以是N个 或者为空;3. 若azbjc 能AC,则azbojac也能AC,其中a,b,c为N个或者为空;输入包含多组测试用例,每行有一个只包含三种字符的

17、字符串,字符串长度小于等于1000。对于给定的字符串,如果能AC则请输出字符串“Accepted”,否则请输出“Wrong Answer”。zojozojoozoojoooozoojoooozoojoooozojozojooooAcceptedWrong Answer2010年浙江大学计算机及软件工程研究生机试真题1007: 奥运排序问题按要求,给国家进行排名。有多组数据。第一行给出国家数N,要求排名的国家数M,国家号从0到N-1。第二行开始的N行给定国家或地区的奥运金牌数,奖牌数,人口数(百万)。接下来一行给出M个国家号。排序有4种方式: 金牌总数 奖牌总数 金牌人口比例 奖牌人口比例 对每

18、个国家给出最佳排名排名方式 和 最终排名格式为: 排名:排名方式如果有相同的最终排名,则输出排名方式最小的那种排名,对于排名方式,金牌总数 奖牌总数 金牌人口比例 奖牌人口比例 如果有并列排名的情况,即如果出现金牌总数为 100,90,90,80.则排名为1,2,2,4.每组数据后加一个空行。4 44 8 16 6 24 8 22 12 40 1 2 34 28 10 18 11 28 12 38 13 40 31:2:22010年浙江大学计算机及软件工程研究生机试真题1008: 最短路径问题给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花

19、费,如果最短距离有多条路线,则输出花费最少的。输入n,m,点的编号是1n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其长度为d,花费为p。最后一行是两个数 s,t;起点s,终点t。n和m为0时输入结束。(1n=1000, 0m100000, s != t)输出 一行有两个数, 最短距离及其花费。3 21 2 5 62 3 4 51 30 09 112010年浙江大学计算机及软件工程研究生机试真题1009: 二叉搜索树题目描述 判断两序列是否为同一二叉搜索树序列开始一个数n,(1=n=20) 表示有n个需要判断,n= 0 的时候输入结束。接下去一行是一个序列,序列长度小于

20、10,包含(09)的数字,没有重复数字,根据这个序列可以构造出一颗二叉搜索树。接下去的n行有n个序列,每个序列格式跟第一个序列一样,请判断这两个序列是否能组成同一颗二叉搜索树。输出 如果序列相同则输出YES,否则输出NO567432543267576342YESNO提示来源2005年浙江大学计算机及软件工程研究生机试真题1010: A + B读入两个小于100的正整数A和B,计算A+B.需要注意的是:A和B的每一位数字由对应的英文单词给出.测试输入包含若干测试用例,每个测试用例占一行,格式为A + B =,相邻两字符串有一个空格间隔.当A和B同时为0时输入结束,相应的结果不要输出.输出 对每个

21、测试用例输出1行,即A+B的值.one + two =three four + five six =zero seven + eight nine =zero + zero =90962005年浙江大学计算机及软件工程研究生机试真题1011: 最大连续子序列 给定K个整数的序列 N1, N2, ., NK ,其任意连续子序列可表示为 Ni, Ni+1, ., Nj ,其中 1 = i = j = K。最大连续子序列是所有连续子序列中元素和最大的一个,例如给定序列 -2, 11, -4, 13, -5, -2 ,其最大连续子序列为 11, -4, 13 ,最大和为20。现在增加一个要求,即还需要

22、输出该子序列的第一个和最后一个元素。 测试输入包含若干测试用例,每个测试用例占2行,第1行给出正整数K( K 10000 ),第2行给出K个整数,中间用空格分隔。当K为0时,输入结束,该用例不被处理。 对每个测试用例,在1行里输出最大和、最大连续子序列的第一个和最后一个元素,中间用空格分隔。如果最大连续子序列不唯一,则输出序号i和j最小的那个(如输入样例的第2、3组)。若所有K个元素都是负数,则定义其最大和为0,输出整个序列的首尾元素。6-2 11 -4 13 -5 -210-10 1 2 3 4 -5 -23 3 7 -215 -8 3 2 5 0-1 -5 -2-1 0 -220 11 1

23、310 1 410 3 510 10 100 -1 -20 0 02005年浙江大学计算机及软件工程研究生机试真题1012: 畅通工程 某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?输入 测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N ( 0 ),下面列出了N天的记录。 每天的记录在第一行给出记录的条目数M (M 0 ),下面是M行,每行的格式为 证件号码 签到时间 签离时间 其中时间按“小时:分钟:秒钟”(各占2位)给出,证件号码是长度不超过15的字符串。 对每一天的记录输出1行,即当天开门和关门人的证件号码,中间用1空格分隔。 注意:在裁判的标准测试输入中,所有记录保证完整,每个人的签到时间在签离时间之前,且没有多人同时签到或者签离的情况。ME3021112225321 00:00:00 23:59:59EE301218 08:05:35 20:56:35MA301134 12:35:45 21:40:42CS301111 15:30:28

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1