2011年浙江大学计算机及软件工程机试真题
2011浙江省上半年软考网络工程师下午理论考试试题及答案

1、基准达标项满(B)分作为安全基线达标合格的必要条件。
A、50B、60C、70D、802、Red Flag Linux指定域名服务器位置的文件是(C)。
A、etc/hostsB、etc/networksC、etc/rosolv.confD、/.profile3、保证计算机信息运行的安全是计算机安全领域中最重要的环节之一,以下(B)不属于信息运行安全技术的范畴。
A、风险分析B、审计跟踪技术C、应急技术D、防火墙技术4、一个公司在制定信息安全体系框架时,下面哪一项是首要考虑和制定的?(A)A、安全策略B、安全标准C、操作规程D、安全基线5、当今IT的发展与安全投入,安全意识和安全手段之间形成(B)。
A、安全风险屏障B、安全风险缺口C、管理方式的变革D、管理方式的缺口6、下面哪一项最好地描述了组织机构的安全策略?(A)A、定义了访问控制需求的总体指导方针B、建议了如何符合标准C、表明管理意图的高层陈述D、表明所使用的技术控制措施的高层陈述7、Unix系统中的账号文件是(A)。
A、/etc/passwdB、/etc/shadowC、/etc/groupD、/etc/gshadow8、以下哪种风险被定义为合理的风险?(B)A、最小的风险B、可接受风险C、残余风险D、总风险9、以下哪一项计算机安全程序的组成部分是其它组成部分的基础?(A)A、制度和措施B、漏洞分析C、意外事故处理计划D、采购计划10、信息分类是信息安全管理工作的重要环节,下面哪一项不是对信息进行分类时需要重点考虑的?(C)A、信息的价值B、信息的时效性C、信息的存储方式D、法律法规的规定11、在对一个企业进行信息安全体系建设中,下面哪种方法是最佳的?(B)A、自下而上B、自上而下C、上下同时开展D、以上都不正确12、下列情形之一的程序,不应当被认定为《中华人民共和国刑法》规定的“计算机病毒等破坏性程序”的是:(A)。
A、能够盗取用户数据或者传播非法信息的B、能够通过网络、存储介质、文件等媒介,将自身的部分、全部或者变种进行复制、传播,并破坏计算机系统功能、数据或者应用程序的C、能够在预先设定条件下自动触发,并破坏计算机系统功能、数据或者应用程序的D、其他专门设计用于破坏计算机系统功能、数据或者应用程序的程序13、/etc/ftpuser文件中出现的账户的意义表示(A)。
2011年考研计算机统考试题及答案

2011 计算机考研试题及参考答案1、下列选项中,满足短任务优先且不会发生饥饿现象的调度算法是____。
CA. 先来先服务B. 时间片轮转C. 高响应比优先D. 非抢占式短任务优先解析:本题是对典型进程调度算法的考察,响应比=作业响应时间/作业执行时间=(作业执行时间+作业等待时间)/作业执行时间。
高响应比算法,在等待时间相同情况下,作业执行时间越少,响应比越高,优先执行,满足短任务优先。
随着等待时间增加,响应比也会变大,执行机会就增大,所以不会产生饥饿现象。
先来先服务和时间片轮转不符合短任务优先,非抢占式短任务优先会产生饥饿现象。
以下哪一些是基于时间片的调度算法____。
ABA. 时间片轮转B. 多级反馈队列调度算法C. 抢占式调度算法D. 先来先服务调度算法解析:本题考察进程调度算法中的时间片调度算法。
其中的时间片轮转法以及多级反馈队列调度算法是基于时间片的调度算法。
至于其他的算法均不是基于时间片的调度算法。
2、下列选项中,在用户态执行的是____。
AA. 命令解释程序B. 缺页处理程序C. 进程调度程序D. 时钟中断处理程序解析:本题涉及的考点是OS的概念、特征、功能和提供的服务,具体考查的是处理机的状态,以及在不同的状态下执行的程序。
缺页处理程序和时钟中断都属于中断,在核心态执行。
进程调度属于系统调用在核心态执行,命令解释程序属于命令接口,它在用户态执行。
在一般OS中必不可少的调度是____。
DA. 高级调度B. 中级调度C. 作业调度D. 进程调度解析:高级调度也就是作业调度,用于决定把外存上处于后备队列中的哪些作业调入内存,并为它们创建进程、分配必要的资源,然后,再将新创建的进程排在就绪队列上,准备执行。
在批处理系统中,需要有高级调度,但在分时系统和实时系统中通常不需要作业调度。
所以不是必不可少的调度。
中级调度它按照一定的算法将外存中已具备运行条件的进程换入内存,将内存中处于阻塞状态的某些进程换出到外存。
2011浙江大学复试上机

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。
2011计算机考研真题及参考答案完整版

中,不.属于偏移寻址方式的是
A.间接寻址
B.基址寻址
C.相对寻址
D.变址寻址
17.某机器有一个标志寄存器,其中有进位/借位标志 CF、零标志 ZF、符号标志 SF 和溢
出标志 OF,条件转移指令 bgt(无符号整数比较大于时转移)的转移条件是
A.CF+OF=1 B. SF+ZF =1
C. CF+ZF =1
执行的叙述中,错.误.的是 A.每个指令周期中 CPU 都至少访问内存一次
B.每个指令周期一定大于或等于一个 CPU 时钟周期
C.空操作指令的指令周期中任何寄存器的内容都不会被改变
D.当前程序在每条指令执行结束时都可能被外部中断打断
20.在系统总线的数据线上,不.可能传输的是
A.指令
B.操作数
C.握手(应答)信号
40.主机甲与主机乙之间已建立一个 TCP 连接,主机甲向主机乙发送了 3 个连续的 TCP
段,分别包含 300 字节、400 字节和 500 字节的有效载荷,第 3 个段的序号为 900。若
主机乙仅正确接收到第 1 和第 3 个段,则主机乙发送给主机甲的确认序号是
A.300
B.500
C.1200
D.1400
B.只能为 1
C.可能为 0、1 或 2
D.可能为-1、0、1 或 2
33.TCP/IP 参考模型的网络层提供的是
A.无连接不可靠的数据报服务
B.无连接可靠的数据报服务
C.有连接不可靠的虚电路服务
D.有连接可靠的虚电路服务
34.若某通信链路的数据传输速率为 2400 bps,采用 4 相位调制,则该链路的波特率是
μs,将缓冲区的数据传送到用户区的时间是 50 μs,CPU 对一块数据进行分析的时间为
2011年软件工程试题A卷

int x=0,y=0;
while(iRecordNum-->0){
if(0==iType){
x=y+2;
break;
}
else
if(1==iType)
x=y+10;
else
x=y+20;
}
}
试用基本路径法设计测试用例。
期末考试试题A参考答案与评分标准
只要与程序设计风格有关均给5分
4.正确(2分)
理由:前期发现错误可以很快的修改,这时候往往软件也还没有开发完成,与错误有关的模块也相对少点,修改起来成本就小;越到后期,相关模块就越多,可能一个错误影响到了整个软件的架构,那时候修改起来成本就高。(3分)
二、绘制数据流图(10分)
评分标准:两个加工框(4分),三个文件存储(6分)。
Path4
X=20,y=0
2.在软件开发过程中,为了提高工作效率,保证工程质量,软件项目开发人员的组织、分工与管理是一项十分重要和复杂的工作。如果你是项目经理,以你的大作业作为一个软件项目,请叙述出你是如何组织和分工软件开发人员的?
3.程序设计风格是指一个人编写程序时的表现出来的特点、习惯和逻辑思路等。结合你的大作业,为了具有良好的设计风格,应该注意哪些方面的问题?
2.计算高校录取线分:根据标准分和招生计划文件中的招生人数,计算录取线,存入录取线文件。
三、面向对象的需求分析(20分)
超市进销存管理系统按其业务功能分成订货、销售和库存三部分,超市进销存系统的需求描述:
1.销售
(1)售货员接收顾客订购,输入顾客购买的商品,计算总价;
(2)顾客付款并接收清单;
2011年上半年浙江省高校计算机等级考试三级网络技术试卷和答案

2011年上半年浙江省高等学校计算机等级考试三级(网络技术及应用)试卷(答案)说明(1)本试卷满分100分,考试时间为120分钟;(2)考生应将所有试题的答案填写在案卷上;(3)请在试卷上填写学校名称、准考证号和姓名,并将你的准考证号的后五位填写在案卷1页右下角的指定位置内。
一、基础知识(共60分)判断题1-10,请在答卷上各题对应位置题“√”和“×”表示对和错。
(每题1分,共10分)1.OSI/RM参考模型中最低层是网络层。
(×)2.令牌环网使用的协议标准是IEEE802.5。
(√)3.UNIX操作系统采用星型文件系统,具有良好的安全性、保密性和可维护性。
(×)4.卫星通信的传播时延很短,所以速度快。
(×)5.数字通信中,使发送双方在时间基准上保持一致的技术是同步技术。
(√)6.IPv6采用128位地址长度,按每16位划分一个位段,并用冒号隔开。
(√)7.为确保连接建立和终止的可靠性,TCP采用了2次握手法。
(×)8.网络的安全管理是使用网络性能维持在较高水平。
(×)9.防火墙可以起到阻止内部网络用户对外部进行攻击的作用。
(×)10.包过滤防火墙依据规则对接收的IP包进行处理,决定是转发还是丢弃。
(√)选择题11-35,请在答卷上各题选项对应的位置上填“√”。
(每题2分,共50分)11.功能完备的计算机网络需要定制一套复杂的协议集,对于复杂的计算机网络协议来说,最好的组织方式为( A )A.层次结构模型B.连续地址编码模型C.分布层进程通信模型D.混合机构模型12.网络协议精确地规定了交换数据的( B )A.格式和结果B.格式和时序C.结果和时序D.格式、结果和时序13.如果不进行数据压缩,直接将分辨率为640×480的彩色图像(每像素用24bit表示)以每秒25帧显示,那么它需要占用的通信带宽是(B )。
A.368MbpsB.184MbpsC.92MbpsD.46Mbps14.数据传输中“噪音”指的是( A )A. 信号在传输过程中受到的干扰B.传输过程中信号的衰减C.音频信号字传输过程中的失真D.以上都是15.一台交换机具有48个10/100Base-TX自适应端口与2个可扩展的1000Base-X端口,那么在交换机满配置和综合考虑性价比的情况下,其背板带宽较适合选择为(B).A..6.8GbpsB.13.6GbpsC.16GbpsD.40Gbps16.某Ethernet中,有A、B、C、D四台主机,如果A向B发送数据,那么(B )。
2011年11月全国计算机技术与软件专业技术资格(水平)考试《软件评测师(中级)》上午考试真题及详解

2011年11月全国计算机技术与软件专业技术资格(水平)考试《软件评测师(中级)》上午考试真题及详解试题(1)若某条无条件转移汇编指令采用直接寻址,则该指令的功能是将指令中的地址码送入(1)。
A.PC(程序计数器)B.AR(地址寄存器)C.AC(累加器)D.ALU(算术逻辑单元)【答案】A【解析】直接寻址是指操作数存放在内存单元中,指令中直接给出操作数所在存储单元的地址。
而跳转指令中的操作数即为要转向执行的指令地址,因此应将指令中的地址码送入程序计数器(PC),以获得下一条指令的地址。
试题(2)若某计算机系统的I/O接口与主存采用统一编址,则输入输出操作是通过(2)指令来完成的。
A.控制B.中断C.输入输出D.访存【答案】D【解析】与内存单元统一编址方式下,I/O接口中有关的寄存器或存储部件被看作存储器单元,与主存中的存储单元统一编址。
这样内存地址和接口地址统一在一个公共的地址空间里,对I/O接口的访问就如同对主存单元的访问一样,可以用访问内存单元的指令访问I/O接口。
试题(3)在程序的执行过程中,Cache与主存的地址映像由(3)。
A.专门的硬件自动完成B.程序员进行调度C.操作系统进行管理D.程序员和操作系统共同协调完成【答案】A【解析】高速缓存(Cache)的出现主要有两个因素:首先是由于CPU的速度和性能提高很快而主存速度较低且价格高,其次就是程序执行的局部性特点。
因此,才将速度比较快而容量有限的静态存储器芯片构成Cache,以尽可能发挥CPU的高速度。
因此,必须用硬件来实现Cache的全部功能。
试题(4)总线复用方式可以(4)。
A.提高总线的传输带宽B.增加总线的功能C.减少总线中信号线的数量D.提高CPU利用率【答案】C【解析】总线是一组能为多个部件分时共享的信息传送线,用来连接多个部件并为之提供信息交换通路,通过总线复用方式可以减少总线中信号线的数量,以较少的信号线传输更多的信息。
2011年浙大软院878自主命题试卷

浙江大学二〇一一年攻读硕士学位研究生入学考试试题考试科目:计算机专业基础(A卷)编号: 878注意:答案必须写在答题纸上,写在试卷或草稿纸上均无效。
版本说明:源自nunuqq1的扫描版、由群内各位童鞋手打而成:星星、心有林夕、海贼坛子、ALAZ、比雕。
感谢之。
如有错误请指出。
谢谢第一部分:数据结构(共60分)一、单项选择题(每题2分,共24分)1. 设某二维数组A[1..n,1..n],则在该数组中用顺序查找发查找一个元素的时间复杂性为:A. O(log2n)B. O(n)C. O(nlog2n)D.O(n2)2. 若某堆栈的输入序列为1,2,3,…,n-1,n,输出序列为递减序列,则为了满足这样的序列输出,该栈的容量至少必须是:A. n/2B. nC. n*nD. 无法判定3. 若采用带头、尾指针的单向链表表示一个堆栈,那么该堆栈的栈顶指针top应该如何设置A. 将表头项设置为topB. 将链表尾设置为topC. 随便哪端作为top都可以D. 链表头、尾都不适合作为top4. 已知10个数据元素为(55,18,10,34,73,62,85,60,26,43),对该数列按从小到大排序,经过一趟冒泡排序后的序列为:A.10,18,34,55,73,62,60,26,43,85B.18,10,34,55,62,73,60,26,43,85C.18,10,34,55,62,60,73,26,43,85D.10,18,34,55,62,60,73,26,43,855.用某种排序方法对数列(25,84,21,47,15,27,68,35,20)进行排序时,元素序列变化情况如下:(1) 25,15,20,47,35,21,68,84,27(2) 20,15,25,21,27,47,35,84,68(3) 15,20,21,25,27,35,47,68,84则所采用的排序方法是:A. 简单选择排序B. 分组为3、2、1的希尔排序C. 冒泡排序D. 以第一个元素为支点的快速排序6. 下列几种排序发中,要求空间最大的是A. 插入排序B. 选择排序C.快速排序D.归并排序7. 对相同的n个整数构成的二叉排序树和最小堆,下面哪个说法是不正确的:A. 二叉排序树高度大于等于最小堆高度B. 对该二叉排序树进行中序遍历可得到从小到大的序列C.从最小堆根节点到其任何叶节点的路径上的节点值构成从小到大的序列D.对该最小堆进行按层次(level order)遍历可得到从小到大的序列8. 在为n个对象设计最优编码时,如果相应的哈夫曼树有67个节点,则可知n的值为:A. 22B. 33C. 34D. 不确定9、某二叉树的前序遍历序列和中序遍历序列正好一样,则该二叉树一定是:A.任一结点无左孩子 B. 任一结点无右孩子C.只有一个根结点 D. 不存在10、所谓“好的”散列(hash)函数应该有一个重要的性质,即函数值应当尽量以什么方式取其值域的每个值?A. 最大概率B. 最小概率C. 平均概率D. 同等概率11、给定一个无向有权图G,下列哪些说法是正确的?A. 设T为G的最小生成树,那么T中任何两个顶点之间的路径就是图G中这两个顶点的最短路径;B. 设P是v到u的最短路径,如果将图G中的每条边长度均加1后,那么P仍然是从v到u的最短路径;C. 如果该图有n个顶点且正好有n-1条边,那么该图一定没有回路;D. 以上说法都不对。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
2011年浙江大学计算机及 软件学院机试真题感谢王道会员手工录入了这份真题,任何组织和个人无权将其用于任何商业赢利为目的的活动!予人玫瑰,手有余香,王道论坛伴你一路同行!A+B for Matrices (30)Time Limit: 1 Second Memory Limit: 32768 KBThis 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.InputThe 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.OutputFor each test case you should output in one line the total number of zero rows and columns of A+B.Sample Input2 21 11 1-1 -110 92 31 2 34 5 6-1 -2 -3-4 -5 -6Sample Output15Grading (25)Time Limit: 1 Second Memory Limit: 32768 KBGrading 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 is within the tolerance, that is, if |G1 - G2| ≤ T, this problem'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 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 tolerance with neither G1nor G2, a judge will give the final grade G J.InputEach input file contains one test case.Each case occupies a line containing six positive integers: P, T, G1, G2, G3, and G J, as described in the problem. It is guaranteed that all the grades are valid, that is, in the interval [0, P].OutputFor each test case you should output the final grade of the problem in a line. The answer must be accurate to 1 decimal place.Sample Input 120 2 15 13 10 18Sample Output 114.0Sample Input 220 2 15 10 11 16Sample Output 210.5Sample Input 320 2 15 11 13 18Sample Output 315.0Sample Input 420 1 15 11 13 18Sample Output 418.0Median (25)Time Limit: 1 Second Memory Limit: 32768 KBGiven 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.InputEach input file contains 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.OutputFor each test case you should output the median of the two given sequences in a line.Sample Input4 11 12 13 145 9 10 15 16 17Sample Output13Graduate Admission (20)Time Limit: 1 Second Memory Limit: 32768 KBIt 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 G E, and the interview grade G I. The final grade of an applicant is (G E + G I) / 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 G E. 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 mostpreferred 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.InputEach input file contains 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 the next line, separated by a space, there are M positive integers. The i-th integer is the quota of thei-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 G E and G I, 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.OutputFor 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.Sample Input11 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 4Sample Output0 1035 6 72 81 4。