![「BZOJ1752」[Usaco2005 qua] Til the Cows Come Home](http://hzwer.com/wp-content/themes/ly/image/image_post/2014-12-10_12-49-19.jpg)
DescriptionBessieisoutinthefieldandwantstogetbacktothebarntogetasmuchsleepaspossiblebeforeFarmerJohnwakesherforthemorningmilking.Bessieneedsherbeautysleep,soshewantstogetbackasquicklyaspossible.FarmerJohn'sfieldhasN(2<=N<=1000)landmarksinit,uniquelynumbered1..N.Landmark1isthebarn;theappletreegroveinwhichBessiestandsalldayislandmarkN.CowstravelinthefieldusingT(1<=T<=2000...
![「BZOJ1751」[Usaco2005 qua] Lake Counting](http://hzwer.com/wp-content/themes/ly/image/image_post/2014-12-10_13-01-59.jpg)
DescriptionDuetorecentrains,waterhaspooledinvariousplacesinFarmerJohn'sfield,whichisrepresentedbyarectangleofNxM(1<=N<=100;1<=M<=100)squares.Eachsquarecontainseitherwater('W')ordryland('.').FarmerJohnwouldliketofigureouthowmanypondshaveformedinhisfield.Apondisaconnectedsetofsquareswithwaterinthem,whereasquareisconsideredadjacenttoalleightofitsneighbors.GivenadiagramofFar...

Applemanhasatreewith n vertices.Someofthevertices(atleastone)arecoloredblackandotherverticesarecoloredwhite.Considerasetconsistingof k (0 ≤ k < n) edgesofAppleman'stree.IfApplemandeletestheseedgesfromthetree,thenitwillsplitinto (k + 1) parts.Note,thateachpartwillbeatreewithcoloredvertices.NowApplemanwonders,whatisthenumberofsetssplittingthetreeinsuchawaythateachresultingp...
近期评论