![「BZOJ1645」[Usaco2007 Open] City Horizon 城市地平线](http://hzwer.com/wp-content/themes/ly/image/image_post/2014-12-05_10-07-49.jpg)
DescriptionFarmerJohnhastakenhiscowsonatriptothecity!Asthesunsets,thecowsgazeatthecityhorizonandobservethebeautifulsilhouettesformedbytherectangularbuildings.TheentirehorizonisrepresentedbyanumberlinewithN(1<=N<=40,000)buildings.Buildingi'ssilhouettehasabasethatspanslocationsA_ithroughB_ialongthehorizon(1<=A_i<B_i<=1,000,000,000)andhasheightH_i(1<=H_i<=1,000,000,...
![「BZOJ1672」[Usaco2005 Dec] Cleaning Shifts 清理牛棚](http://hzwer.com/wp-content/themes/ly/image/image_post/2014-12-10_12-51-16.jpg)
DescriptionFarmerJohn'scows,pamperedsincebirth,havereachednewheightsoffastidiousness.Theynowrequiretheirbarntobeimmaculate.FarmerJohn,themostobligingoffarmers,hasnochoicebuthiresomeofthecowstocleanthebarn.FarmerJohnhasN(1<=N<=10,000)cowswhoarewillingtodosomecleaning.Becausedustfallscontinuously,thecowsrequirethatthefarmbecontinuouslycleanedduringtheworkday,whichrunsfromsecondnumbe...

DZYlovescolors,andheenjoyspainting.Onacolorfulday,DZYgetsacolorfulribbon,whichconsistsof n units(theyarenumberedfrom 1 to n fromlefttoright).Thecolorofthe i-thunitoftheribbonis i atfirst.Itiscolorfulenough,butwestillconsiderthatthecolorfulnessofeachunitis 0 atfirst.DZYlovespainting,weknow.Hetakesupapaintbrushwithcolor x andusesittodrawalineontheribbon.Insuchacasesomecont...
![「BZOJ1628」[Usaco2007 Demo] City skyline](http://hzwer.com/wp-content/themes/ly/image/image_post/2014-12-10_13-02-45.jpg)
DescriptionThebestpartofthedayforFarmerJohn'scowsiswhenthesunsets.Theycanseetheskylineofthedistantcity.Bessiewondershowmanybuildingsthecityhas.Writeaprogramthatassiststhecowsincalculatingtheminimumnumberofbuildingsinthecity,givenaprofileofitsskyline.Thecityinprofileisquitedullarchitecturally,featuringonlybox-shapedbuildings.Theskylineofacityonthehorizonissomewherebetween1andWunitswide(1&...
近期评论