![「BZOJ1751」[Usaco2005 qua] Lake Counting](http://hzwer.com/wp-content/themes/ly/image/image_post/2014-12-10_12-37-48.jpg)
DescriptionDuetorecentrains,waterhaspooledinvariousplacesinFarmerJohn'sfield,whichisrepresentedbyarectangleofNxM(1<=N<=100;1<=M<=100)squares.Eachsquarecontainseitherwater('W')ordryland('.').FarmerJohnwouldliketofigureouthowmanypondshaveformedinhisfield.Apondisaconnectedsetofsquareswithwaterinthem,whereasquareisconsideredadjacenttoalleightofitsneighbors.GivenadiagramofFar...
![「BZOJ1673」[Usaco2005 Dec] Scales 天平](http://hzwer.com/wp-content/themes/ly/image/image_post/2014-12-10_11-30-00.jpg)
DescriptionFarmerJohnhasabalanceforweighingthecows.HealsohasasetofN(1<=N<=1000)weightswithknownmasses(allofwhichfitin31bits)foruseononesideofthebalance.Heplacesacowononesideofthebalanceandthenaddsweightstotheothersideuntiltheybalance.(FJcannotputweightsonthesamesideofthebalanceasthecow,becausecowstendtokickweightsinhisfacewhenevertheycan.)Thebalancehasamaximummassratingandwillbreak...
![「BZOJ1653」[Usaco2006 Feb] Backward Digit Sums](http://hzwer.com/wp-content/themes/ly/image/image_post/572E19CF-1B2A-4ED3-A4B1-4DA6E0EEF191.png)
DescriptionFJandhiscowsenjoyplayingamentalgame.Theywritedownthenumbersfrom1toN(1<=N<=10)inacertainorderandthensumadjacentnumberstoproduceanewlistwithonefewernumber.Theyrepeatthisuntilonlyasinglenumberisleft.Forexample,oneinstanceofthegame(whenN=4)mightgolikethis:31244367916BehindFJ'sback,thecowshavestartedplayingamoredifficultgame,inwhichtheytrytodeterminethestartingsequencefromo...
![「BZOJ1619」[Usaco2008 Nov] Guarding the Farm 保卫牧场](http://hzwer.com/wp-content/themes/ly/image/image_post/2014-12-10_13-24-08.jpg)
DescriptionThefarmhasmanyhillsuponwhichFarmerJohnwouldliketoplaceguardstoensurethesafetyofhisvaluablemilk-cows.Hewondershowmanyguardshewillneedifhewishestoputoneontopofeachhill.Hehasamapsuppliedasamatrixofintegers;thematrixhasN(1<N<=700)rowsandM(1<M<=700)columns.EachmemberofthematrixisanaltitudeH_ij(0<=H_ij<=10,000).Helphimdeterminethenumberofhilltopsonthemap.Ahill...

Manystudentsliveinadormitory.Adormitoryisawholenewworldoffunnyamusementsandpossibilitiesbutitdoeshaveitsdrawbacks.Thereisonlyoneshowerandtherearemultiplestudentswhowishtohaveashowerinthemorning.That'swhyeverymorningthereisalineoffivepeopleinfrontofthedormitoryshowerdoor.Assoonastheshoweropens,thefirstpersonfromthelineenterstheshower.Afterawhilethefirstpersonleavestheshowerandthenextpersonent...

TheemployeesoftheR1companyoftenspendtimetogether:theywatchfootball,theygocamping,theysolvecontests.So,it'snobigdealthatsometimessomeonepaysforsomeoneelse.Todayisthedayofgivingoutmoneyrewards.TheR1companyCEOwillinviteemployeesintohisofficeonebyone,rewardingeachoneforthehardworkthismonth.TheCEOknowswhoowesmoneytowhom.Andhealsounderstandsthatifheinvitesperson x tohisofficeforareward,a...
近期评论