浙江大学计算机组成2011-2012试卷计组试卷(有答案)
- 格式:pdf
- 大小:333.58 KB
- 文档页数:5


浙江大学大学计算机基础题库测试试卷:计科教材练习【01】--------------------------------------------------------------------------------一、判断题,共10题, 总分:10分。
请直接点击选择True or False.1.计算机文化是指能够理解计算机是什么以及它是如何作为资源被使用的。
( T ) True False2.计算思维的本质是对求解问题的抽象和实现问题处理的自动化。
如果说,数学思维是“抽象和关系”,那么计算思维则是“状态和过程”。
( T ) True False3.我们可以定义计算机系统是指计算机的所有资源。
它包括了计算机硬件和软件。
( T ) True False4.计算机系统结构是研究计算机的硬件互联使得计算机更有效、更高速和更可靠。
( T ) True False5.应用软件是管理计算机所需要的那些软件。
( F ) True False6.程序设计主要有面向文本设计技术和面向对象设计技术。
( F ) True False7.程序是算法的具体实现。
( T ) True False8.计算机被加电后进入工作状态,就开始执行程序,直到关机为止。
( T ) True False9.因特网的开放结构,主要表现在进入网络的机器,属于企业、机构、政府甚至个人的,它们之间的关系是平等地位,没有权限的定义。
( T ) True False10.因特网是一个庞大的计算机互联形成的网络,构建因特网的主要目的是实现各种通信。
( F ) True False--------------------------------------------------------------------------------二、单选题,共11题, 总分:11分。
请四个中选择一个是正确的答案。
1.半导体技术是按一个较高的指数规律发展的。
根据摩尔定律,当价格不变时,集成电路上可容纳的晶体管数目,约每隔( D )个月便会增加一倍,性能也将提升一倍。
1001: A+B for Matrices时间限制:1 Sec 内存限制:32 MB提交:931 解决:514题目描述This time, you are supposed to find A+B where A and B are two matrices, and then count the number of zero rows and columns.输入The input consists of several test cases, each starts with a pair of positive integers M and N (≤10) which are the number of rows and columns of the matrices, respectively. Then 2*M lines follow, each contains N integers in [-100, 100], separated by a space. The first M lines correspond to the elements of A and the second M lines to that of B.The input is terminated by a zero M and that case must NOT be processed.输出For each test case you should output in one line the total number of zero rows and columns of A+B.样例输入2 21 11 1-1 -110 92 31 2 34 5 6-1 -2 -3-4 -5 -6样例输出15提示来源2011年浙江大学计算机及软件工程研究生机试真题1002: Grading时间限制:1 Sec 内存限制:32 MB提交:748 解决:189题目描述Grading hundreds of thousands of Graduate Entrance Exams is a hard work. It is even harder to design a process to make the results as fair as possible. One way is to assign each exam problem to 3 independent experts. If they do not agree to each other, a judge is invited to make the final decision. Now you are asked to write a program to help this process.For each problem, there is a full-mark P and a tolerance T(<P) given. The grading rules are: • A problem will first be assigned to 2 experts, to obtain G1 and G2. If the difference iswithin the tolerance, that is, if |G1 - G2| ≤ T, this problem's grade will be the average of G1 andG2.• 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 problem's grade will be the average of G3 and the closest grade.• If G3 is within the tolerance with both G1 and G2, then this problem's grade will be the maximum of the three grades.• If G3 is within the toleranc e with neither G1 nor G2, a judge will give the final grade GJ.输入Each input file may contain more than one test case.Each case occupies a line containing six positive integers: P, T, G1, G2, G3, and GJ, as described 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 18样例输出14.0提示来源2011年浙江大学计算机及软件工程研究生机试真题1004: Median时间限制:1 Sec 内存限制:32 MB提交:652 解决:168题目描述Given an increasing sequence S of N integers, the median is the number at the middle position. For example, 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 sequences of integers, you are asked to find their median.输入Each input file may contain more than one test case.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 guaranteed 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 17样例输出13提示1005: Graduate Admission时间限制:1 Sec 内存限制:32 MB提交:291 解决:50题目描述It is said that in 2011, there are about 100 graduate schools ready to proceed 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. 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 the 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 one's turn to be admitted; and if the quota of one's most preferred shcool is not exceeded, then one will be admitted to this school, or one's other choices will be 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 if its quota will be exceeded.输入Each input file may contain more thanone 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 o f choices an applicant may have.In 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 applicant's GE and GI, respectively. The next K integers represent 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 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 3 5100 90 0 3 490 100 1 2 090 90 5 1 380 90 1 0 280 80 0 1 280 80 0 1 280 70 1 3 270 80 1 2 3100 100 0 2 4样例输出0 1035 6 7 2 81 4。
2021年浙江大学软件工程专业《计算机组成原理》科目期末试卷A(有答案)一、选择题1、Cache用组相联映射,一块大小为128B,Cache共64块,4块分一组,主存有4096块,主存地址共需()位。
A.19B.18C.17D.162、一个存储器系统中,常常同时包含ROM和RAM两种类型的存储器,如果用lK×8位的ROM芯片和lK×4位的RAM芯片,组成4K×8位的ROM和1K×8位的RAM存储系统,按先ROM后RAM进行编址。
采用3-8译码器选片,译码信号输出信号为Y0~Y7,其中Y4选择的是()。
A.第一片ROMB.第五片ROMC.第一片RAMD.第一片RAM和第二片RAM3、假设编译器规定int 和shot类型长度分别为32位和16位,若有下列C语言语句:unsigned short x=65530;unsigned int y=x;得到y的机器数为()。
A.00007FFAHB.0000 FFFAHC.FFFF 7FFAHD.FFFF FFFAH4、计算机中表示地址时,采用()。
A.原码B.补码C.移码D.无符号数5、假设寄存器的内容为00000000,若它等于-128,则该机器采用了()。
A.原码B.补码C.反码D.移码6、中断判优逻辑和总线仲裁方式相类似,下列说法中,正确的是()。
I.在总线仲裁方式中,独立请求方式响应时间最快,是以增加处理器开销和增加控制线数为代价的II.在总线仲裁方式中计数器查询方式,若每次计数都从“0”开始,则所有设备使用总线的优先级相等III.总线仲裁方式一般是指I/O设备争用总线的判优方式,而中断判优方式一般是指I/O设备争用CPU的判优方式IV.中断判优逻辑既可以通过硬件实现,也可以通过软件实现,A. I,IIB. I,III,IVC. I,II,IVD.I,IV7、某机器I/O设备采用异步串行传送方式传送字符信息,字符信息格式为1位起始位、8位数据位、1位校验位和1位停止位。