DescriptionTeacherMaihasakingdom.Amonsterhasinvadedthiskingdom,andTeacherMaiwantstokillit.MonsterinitiallyhashHP.AnditwilldieifHPislessthan1.TeacherMaiandmonstertaketurnstodotheiraction.Inoneround,TeacherMaicanattackthemonstersothattheHPofthemonsterwillbereducedbya.Attheendofthisround,theHPofmonsterwillbeincreasedbyb.Afterkconsecutiveround'sattack,TeacherMaimusttakearestin...
http://218.5.5.242:9018/JudgeOnline/problem.php?id=1592题目描述FarmerJohn'sNcows(1<=N<=100,000)arestandingatvariouspositionsalongalongone-dimensionalfence. Theithcowisstandingatpositionx_i(anintegerintherange0...1,000,000,000)andhasbreedb_i(either'G'forGuernseyor'H'forHolstein). Notwocowsoccupythesameposition.FJwantstotakeaphotoofacontiguousintervalofcowsforthecountyfair,butw...
Vasyafollowsabasketballgameandmarksthedistancesfromwhicheachteammakesathrow.Heknowsthateachsuccessfulthrowhasvalueofeither2or3points.Athrowisworth2pointsifthedistanceitwasmadefromdoesn'texceedsomevalueofdmeters,andathrowisworth3pointsifthedistanceislargerthandmeters,wheredissomenon-negativeinteger.Vasyawouldliketheadvantageofthepointsscoredbythefirstteam(thepointsofthefirstteamminusthepointsof...
Vasyahasbecomeinterestedinwrestling.Inwrestlingwrestlersusetechniquesforwhichtheyareawardedpointsbyjudges.Thewrestlerwhogetsthemostpointswins.Whenthenumbersofpointsofbothwrestlersareequal,thewrestlerwhosesequenceofpointsislexicographicallygreater,wins.Ifthesequencesoftheawardedpointscoincide,thewrestlerwhoperformedthelasttechniquewins.Yourtaskistodeterminewhichwrestlerwon.InputThefirstline...
Vasyahasstartedwatchingfootballgames.Hehaslearnedthatforsomefoulstheplayersreceiveyellowcards,andforsomefoulstheyreceiveredcards.Aplayerwhoreceivesthesecondyellowcardautomaticallyreceivesaredcard.Vasyaiswatchingarecordedfootballmatchnowandmakesnotesofallthefoulsthathewouldgiveacardfor.HelpVasyadetermineallthemomentsintimewhenplayerswouldbegivenredcardsifVasyawerethejudge.Foreachplayer,Vas...
Vanyawalkslateatnightalongastraightstreetoflengthl,litbynlanterns.Considerthecoordinatesystemwiththebeginningofthestreetcorrespondingtothepoint0,anditsendcorrespondingtothepointl.Thenthei-thlanternisatthepointai.Thelanternlightsallpointsofthestreetthatareatthedistanceofatmostdfromit,wheredissomepositivenumber,commonforalllanterns.Vanyawonders:whatistheminimumlightradiusdshouldthelanternshavet...
Vanyagotncubes.Hedecidedtobuildapyramidfromthem.Vanyawantstobuildthepyramidasfollows:thetoplevelofthepyramidmustconsistof1cube,thesecondlevelmustconsistof1 + 2 = 3cubes,thethirdlevelmusthave1 + 2 + 3 = 6cubes,andsoon.Thus,thei-thlevelofthepyramidmusthave1 + 2 + ... + (i - 1) + icubes.Vanyawantstoknowwhatisthemaximumheightofthepyramidthathecanmakeusingthegivencubes.InputT...
赛前不知道做啥,不想打游戏,就找点easy的题练手,水了7题。。。「codechefCHEFGR」ChefandGround[crayon-67438b6a01c18519230927/]「codechefPRPOTION」MagicalGirlandColoredLiquidPotions[crayon-67438b6a01c24973290182/]「codechefFATCHEF」Remypaintsthefence[crayon-67438b6a01c2d260205061/]「codechefCHEFLR」ChefandLeft-Right[crayon-67438b6a01c33304657957/]「codechefDIS...
近期评论