![「BZOJ1679」[Usaco2005 Jan] Moo Volume 牛的呼声](http://hzwer.com/wp-content/themes/ly/image/image_post/2014-12-10_12-35-35.jpg)
DescriptionFarmerJohnhasreceivedanoisecomplaintfromhisneighbor,FarmerBob,statingthathiscowsaremakingtoomuchnoise.FJ'sNcows(1<=N<=10,000)allgrazeatvariouslocationsonalongone-dimensionalpasture.Thecowsareverychattyanimals.Everypairofcowssimultaneouslycarriesonaconversation(soeverycowissimultaneouslyMOOingatalloftheN-1othercows).WhencowiMOOsatcowj,thevolumeofthisMOOmustbee...

QuiterecentlyacreativestudentLeshahadalectureontrees.AfterthelectureLeshawasinspiredandcameupwiththetreeofhisownwhichhecalleda k-tree.A k-treeisaninfiniterootedtreewhere:eachvertexhasexactly k children;eachedgehassomeweight;ifwelookattheedgesthatgoesfromsomevertextoitschildren(exactly k edges),thentheirweightswillequal 1, 2, 3, ..., k.Thepicturebelowshowsapartofa3-tree.  ...
近期评论