欢迎来到天天文库
浏览记录
ID:41414258
大小:78.30 KB
页数:23页
时间:2019-08-24
《浙江大学机试真题》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、2011年浙江大学计算机及软件工程研究生机试真题1001:A+BforMatrices题目描述Thistime,youaresupposedtofindA+BwhereAandBaretwomatrices,andthencountthenumberofzerorowsandcolumns.输入Theinputconsistsofseveraltestcases,eachstartswithapairofpositiveintegersMandN(<10)whicharethenumberofrowsandcolumnsofthematrices,respectively.Then
2、2*Mlinesfollow,eachcontainsNintegersin[-100,100],separatedbyaspace.ThefirstMlinescorrespondtotheelementsofAandthesecondMlinestothatofB.TheinputistenninatedbyazeroMandthatcasemustNOTbeprocessed.输出ForeachtestcaseyoushouldoutputinonelinethetotalnumberofzerorowsandcolumnsofA+B.样例输入221111-1-1109231
3、23456-1-2-3-4-5-60样例输出152011年浙江大学计算机及软件工程研究化机试真题1002:Grading题目描述GradinghundredsofthousandsofGraduateEntranceExamsisahardwork.Itisevenhardertodesignaprocesstomaketheresultsasfairaspossible.Onewayistoassigneachexamproblemto3independentexperts.Iftheydonotagreetoeachother,ajudgeisinvitedtomakethef
4、inaldecision.Nowyouarcaskedtowriteaprogramtohelpthisprocess.Foreachproblem,thereisafull-markPandatoleranceT(
5、G1-G2
6、7、hedifferenceexceedsT,the3rdexpertwillgiveG3.•IfG3iswithinthetolerancewitheitherG1orG2,butNOTboth,thenthisproblem'sgradewillbetheaverageofG3andtheclosestgrade.•IfG3iswithinthetoleraneewithbothG1andG2,thenthisproblem'sgradewillbethemaximumofthethreegrades.•IfG3iswithinthetolerancewithneitherG1no8、rG2,ajudgewillgivethefinalgradeGJ.输入Eachinputfilemaycontainmorethanonetestcase・Eachcaseoccupiesalinecontainingsixpositiveintegers:P,T,Gl,G2,G3,andGJ,asdescribedintheproblem.Itisguaranteedthatallthegradesarevalid,thatis,intheinterval[0,P].输出Foreachtestcaseyoushouldoutputthefinalgradeoftheproble9、minaline.Theanswermustbeaccurateto1decimalplace.样例输入20215131018样例输出14.02010年浙江大学计算机及软件工程研究生机试真题1003:A+B题目描述给定两个整数A和B,其表示形式是:从个位开始,每三位数用逗号”,”隔开。现在请计算A+B的结果,并以正常形式输出。输入输入包含多组数据数据,每组数据占一行,由两个整数A和B组成(-10^9
7、hedifferenceexceedsT,the3rdexpertwillgiveG3.•IfG3iswithinthetolerancewitheitherG1orG2,butNOTboth,thenthisproblem'sgradewillbetheaverageofG3andtheclosestgrade.•IfG3iswithinthetoleraneewithbothG1andG2,thenthisproblem'sgradewillbethemaximumofthethreegrades.•IfG3iswithinthetolerancewithneitherG1no
8、rG2,ajudgewillgivethefinalgradeGJ.输入Eachinputfilemaycontainmorethanonetestcase・Eachcaseoccupiesalinecontainingsixpositiveintegers:P,T,Gl,G2,G3,andGJ,asdescribedintheproblem.Itisguaranteedthatallthegradesarevalid,thatis,intheinterval[0,P].输出Foreachtestcaseyoushouldoutputthefinalgradeoftheproble
9、minaline.Theanswermustbeaccurateto1decimalplace.样例输入20215131018样例输出14.02010年浙江大学计算机及软件工程研究生机试真题1003:A+B题目描述给定两个整数A和B,其表示形式是:从个位开始,每三位数用逗号”,”隔开。现在请计算A+B的结果,并以正常形式输出。输入输入包含多组数据数据,每组数据占一行,由两个整数A和B组成(-10^9
此文档下载收益归作者所有