2012Asia 浙江理工 杭州赛区区域赛.pdf
上传人:yy****24 上传时间:2024-09-10 格式:PDF 页数:19 大小:4.6MB 金币:16 举报 版权申诉
预览加载中,请您耐心等待几秒...

2012Asia 浙江理工 杭州赛区区域赛.pdf

2012Asia浙江理工杭州赛区区域赛.pdf

预览

免费试读已结束,剩余 9 页请下载文档后查看

16 金币

下载此文档

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

The37thACM-ICPCAsiaHangzhouRegionalContest---OnlineContestProblemListThe37thACM/ICPCAsiaHangzhouRegionalContest---OnlineContestProblemA.BoomerangDescriptionAustraliaoriginalinhabitantsusedtohuntbyaweaponcalled"boomerang".Whenaboomerangisthrownout,itrotates,hitsthetarget,andthenreturntothethrower.ZXXisthebestboomerangthrowerinAustralia.Hisskillissowonderfulthathisboomerangcandoanyrotationhewantsintheair.Hetravelsaroundtoshowhisskillandmakemoney.Oneofhisclassicshowistothrowouttheboomerang,anditwillpassthroughbetweentwoveryclosepillars.Ofcoursetheboomerangmustflyparalleltotheground.Ifnotso,everybodycandoit.ZXXalwaysputsthetwopillarsascloseaspossibletoshowhisskill,buthewantsyoutofigureoutthesmallestdistancebetweentwopillarswhichallowshisboomerangtogothrough.Tosimplifytheproblem,youcanconsidertheboomerangasasimplepolygonina2Dplane,andeachofitsedgeisparalleltox-axisory-axis.Eachinteriorangleiseither90degreesor270degrees.Twopillarscanbeconsideredastwopoints.Thisillustrationsimplyshowshowaboomerangpassesthroughtwopillars:InputTheinputconsistsofseveraltestcases(lessthan500).Eachtestcasebeginswithanintegern(4<=n<=8),representingthenumberofverticesofapolygon.Nextnlinesgivecoordinatesofnverticesinorder.Eachlinecontainstwointegersxi,yi(|xi|,|yi|<=100000).Foreachtestcasetherearenotwoverticesisinthesameplace.Inputendswithn=0.OutputForeachtestcase,printasinglerealnumberw,representingtheminimumdistancetoensuretheboomerangcanpassthrough.Theanswershouldberoundedto2digitsafterthedecimalpoint.The37thACM/ICPCAsiaHangzhouRegionalContest---OnlineContestSampleInput600100010011111000100800300303020302010101010300300SampleOutput1.4114.14The37thACM/ICPCAsiaHangzhouRegionalContest---OnlineContestProblemB.ArrestDescriptionThereare(N+1)citiesonTATisland.City0iswherepoliceheadquarterlocated.Theeconomyofothercitiesnumberedfrom1toNruinedtheseyearsbecausetheyareallcontrolledbymafia.ThepoliceplantocatchallthemafiagangsintheseNcit