DescriptionFarmerJohnwenttocutsomewoodandleftN(2<=N<=100,000)cowseatingthegrass,asusual.Whenhereturned,hefoundtohishorrorthatthecowswereinhisgardeneatinghisbeautifulflowers.Wantingtominimizethesubsequentdamage,FJdecidedtotakeimmediateactionandtransportthecowsbacktotheirbarn.EachcowiisatalocationthatisTiminutes(1<=Ti<=2,000,000)awayfromthebarn.Furthermore,whilewaitingfortra...
KitaharaHarukihasbought n applesforToumaKazusaandOgisoSetsuna.Nowhewantstodividealltheapplesbetweenthefriends.Eachappleweights100gramsor200grams.OfcourseKitaharaHarukidoesn'twanttooffendanyofhisfriend.ThereforethetotalweightoftheapplesgiventoToumaKazusamustbeequaltothetotalweightoftheapplesgiventoOgisoSetsuna.ButunfortunatelyKitaharaHarukidoesn'thaveakniferightnow,sohecannotsp...
KuriyamaMiraihaskilledmanymonstersandgotmany(namely n)stones.Shenumbersthestonesfrom 1 to n.Thecostofthe i-thstoneis vi.KuriyamaMiraiwantstoknowsomethingaboutthesestonessoshewillaskyoutwokindsofquestions:Shewilltellyoutwonumbers, l and r (1 ≤ l ≤ r ≤ n),andyoushouldtellher .Let ui bethecostofthe i-thcheapeststone(thecostthatwillbeonthe i-thplaceifwearrangealltheston...
Ryoukoisanextremelyforgetfulgirl,shecouldevenforgetsomethingthathasjusthappened.Soinordertoremember,shetakesanotebookwithher,called Ryouko'sMemoryNote.Shewriteswhatsheseesandwhatshehearsonthenotebook,andthenotebookbecamehermemory.ThoughRyoukoisforgetful,sheisalsobornwithsuperbanalyzingabilities.However,analyzingdependsgreatlyongatheredinformation,inotherwords,memory.Soshehastoshufflethr...
DescriptionFarmerJohn'sN(1<=N<=50,000)cows(numbered1..N)areplanningtorunawayandjointhecircus.Theirhoofedfeetpreventthemfromtightropewalkingandswingingfromthetrapeze(andtheirlastattemptatfiringacowoutofacannonmetwithadismalfailure).Thus,theyhavedecidedtopracticeperformingacrobaticstunts.Thecowsaren'tterriblycreativeandhaveonlycomeupwithoneacrobaticstunt:standingontopofeachothertoform...
近期评论