省选pku查漏补缺专题训练

省选pku查漏补缺专题训练

ID:5509266

大小:111.00 KB

页数:9页

时间:2017-12-16

省选pku查漏补缺专题训练_第1页
省选pku查漏补缺专题训练_第2页
省选pku查漏补缺专题训练_第3页
省选pku查漏补缺专题训练_第4页
省选pku查漏补缺专题训练_第5页
资源描述:

《省选pku查漏补缺专题训练》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、PekingUniversityOnlineJudge[March·30·2009]NOI省队第三轮选拔赛-图论算法专题训练试题[第八组]【题目一览】题号第一题第二题第三题第四题题目名称PigsLifeFormsFiringShoot-out提交文件pigs.pas/c/cpplife.pas/c/cppfiring.pas/c/cppshoot.pas/c/cpp输入文件pigs.inlife.infiring.inshoot.in输出文件pigs.outlife.outfiring.outshoot

2、.out时间限制1s5s5s4s试题类型最大流问题后缀树/后缀数组最大权闭包状态压缩动规难度系数★★★★★★★★★★★★★★★★★★★★题目出处POJ1149POJ3294POJ2987POJ3028题号第五题第六题第七题第八题题目名称PipesCommonSubstringsCheckingtheTextSequence提交文件pipes.pas/c/cppsub.pas/c/cpptext.pas/c/cppseq.pas/c/cpp输入文件pipes.insub.intext.inseq.in输出

3、文件pipes.outsub.outtext.outseq.out时间限制1s5s8s2s试题类型连通性状态压缩动规后缀树/后缀数组后缀数组+RMQ后缀数组难度系数★★★★★★★★★★★★★★★★★★题目出处POJ2064POJ3415POJ2758POJ3581Pigs【问题描述】MirkoworksonapigfarmthatconsistsofMlockedpig-housesandMirkocan'tunlockanypighousebecausehedoesn'thavethekeys.Cus

4、tomerscometothefarmoneafteranother.Eachofthemhaskeystosomepig-housesandwantstobuyacertainnumberofpigs.AlldataconcerningcustomersplanningtovisitthefarmonthatparticulardayareavailabletoMirkoearlyinthemorningsothathecanmakeasales-planinordertomaximizethenum

5、berofpigssold.Moreprecisely,theprocedureisasfollowing:thecustomerarives,opensallpig-housestowhichhehasthekey,Mirkosellsacertainnumberofpigsfromalltheunlockedpig-housestohim,and,ifMirkowants,hecanredistributetheremainingpigsacrosstheunlockedpig-houses.Anu

6、nlimitednumberofpigscanbeplacedineverypig-house.Writeaprogramthatwillfindthemaximumnumberofpigsthathecansellonthatday.【输入格式】ThefirstlineofinputcontainstwointegersMandN,1<=M<=1000,1<=N<=100,numberofpighousesandnumberofcustomers.Pighousesarenumberedfrom1to

7、Mandcustomersarenumbered-9-PekingUniversityOnlineJudge[March·30·2009]from1toN.ThenextlinecontainsMintegeres,foreachpig-houseinitialnumberofpigs.Thenumberofpigsineachpig-houseisgreaterorequalto0andlessorequalto1000.ThenextNlinescontainsrecordsaboutthecust

8、omersinthefollowingform(recordaboutthei-thcustomeriswritteninthe(i+2)-thline):AK1K2…KABItmeansthatthiscustomerhaskeytothepig-housesmarkedwiththenumbersK1,K2,…,KA(sortednondecreasingly)andthathewantstobuyBpigs.NumbersAandBc

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。