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-676cc7547a75e870718050/]「codechefPRPOTION」MagicalGirlandColoredLiquidPotions[crayon-676cc7547a767613308579/]「codechefFATCHEF」Remypaintsthefence[crayon-676cc7547a76b565638119/]「codechefCHEFLR」ChefandLeft-Right[crayon-676cc7547a76f671601652/]「codechefDIS...
近期评论