![「BZOJ1754」[Usaco2005 qua] Bull Math](http://hzwer.com/wp-content/themes/ly/image/image_post/2014-12-10_13-23-16.jpg)
DescriptionBullsaresomuchbetteratmaththanthecows.Theycanmultiplyhugeintegerstogetherandgetperfectlypreciseanswers...orsotheysay.FarmerJohnwondersiftheiranswersarecorrect.Helphimcheckthebulls'answers.Readintwopositiveintegers(nomorethan40digitseach)andcomputetheirproduct.Outputitasanormalnumber(withnoextraleadingzeros).FJasksthatyoudothisyourself;don'tuseaspeciallibraryfunctionforthemulti...

DZYlovesPhysics,andheenjoyscalculatingdensity.Almosteverythinghasdensity,evenagraph.Wedefinethedensityofanon-directedgraph(nodesandedgesofthegraphhavesomevalues)asfollows:where v isthesumofthevaluesofthenodes, e isthesumofthevaluesoftheedges.OnceDZYgotagraph G,nowhewantstofindaconnectedinducedsubgraph G' ofthegraph,suchthatthedensityof G' isaslargeaspossible.Aninducedsubgrap...

Artemhasanarrayof n positiveintegers.Artemdecidedtoplaywithit.Thegameconsistsof n moves.Eachmovegoeslikethis.Artemchoosessomeelementofthearrayandremovesit.Forthat,hegetsmin(a, b) points,where a and b arenumbersthatwereadjacentwiththeremovednumber.Ifthenumberdoesn'thaveanadjacentnumbertotheleftorright,Artemdoesn'tgetanypoints.Aftertheelementisremoved,thetwopartsofthearraygluetoge...
近期评论