#0分

1058 A+B in Hogwarts (20分)(水)

IfyouareafanofHarryPotter,youwouldknowtheworldofmagichasitsowncurrencysystem--asHagridexplainedittoHarry,"SeventeensilverSicklestoaGalleonandtwenty-nineKnutstoa...
代码星球 ·2020-08-09

1057 Stack (30分)(树状数组+二分)

Stackisoneofthemostfundamentaldatastructures,whichisbasedontheprincipleofLastInFirstOut(LIFO).ThebasicoperationsincludePush(insertinganelementontothetopposition...

1054 The Dominant Color (20分)(水)

Behindthescenesinthecomputer'smemory,colorisalwaystalkedaboutasaseriesof24bitsofinformationforeachpixel.Inanimage,thecolorwiththelargestproportionalareaiscalled...

1053 Path of Equal Weight (30分)(并查集)

Givenanon-emptytreewithroot R,andwithweight W​i​​ assignedtoeachtreenode T​i​​.The weightofapathfrom R to L isdefin...
代码星球 ·2020-08-09

1050 String Subtraction (20分)

Giventwostrings S​1​​ and S​2​​, S=S​1​​−S​2​​ isdefinedtobetheremainingstringaftertakingallthecharactersin S​2​​ from&...
代码星球 ·2020-08-09

1049 Counting Ones (30分)

Thetaskissimple:givenanypositiveinteger N,youaresupposedtocountthetotalnumberof1'sinthedecimalformoftheintegersfrom1to N.Forexample,given N ...
代码星球 ·2020-08-09

1046 Shortest Distance (20分)

Thetaskisreallysimple:given N exitsonahighwaywhichformsasimplecycle,youaresupposedtotelltheshortestdistancebetweenanypairofexits.InputSpecification:Ea...
代码星球 ·2020-08-09

1045 Favorite Color Stripe (30分)(简单dp)

Evaistryingtomakeherowncolorstripeoutofagivenone.Shewouldliketokeeponlyherfavoritecolorsinherfavoriteorderbycuttingoffthoseunwantedpiecesandsewingtheremainingpa...

1042 Shuffling Machine (20分)(水)

Shufflingisaprocedureusedtorandomizeadeckofplayingcards.Becausestandardshufflingtechniquesareseenasweak,andinordertoavoid"insidejobs"whereemployeescollaboratewi...
代码星球 ·2020-08-09

1041 Be Unique (20分)(水)

BeinguniqueissoimportanttopeopleonMarsthateventheirlotteryisdesignedinauniqueway.Theruleofwinningissimple:onebetsonanumberchosenfrom[1].Thefirstonewhobetsonauni...
代码星球 ·2020-08-09

1038 Recover the Smallest Number (30分)(贪心)

Givenacollectionofnumbersegments,youaresupposedtorecoverthesmallestnumberfromthem.Forexample,given{32,321,3214,0229,87},wecanrecovermanynumberssuchlike32-321-32...

1035 Password (20分)(水)

ToprepareforPAT,thejudgesometimeshastogeneraterandompasswordsfortheusers.Theproblemisthattherearealwayssomeconfusingpasswordssinceitishardtodistinguish 1&n...
代码星球 ·2020-08-09

1034 Head of a Gang (30分)(dfs 利用map)

Onewaythatthepolicefindstheheadofagangistocheckpeople'sphonecalls.Ifthereisaphonecallbetween A and B,wesaythat A and B isrela...
代码星球 ·2020-08-09

1031 Hello World for U (20分)

Givenanystringof N (≥)characters,youareaskedtoformthecharactersintotheshapeof U.Forexample, helloworld canbeprintedas:hdellrlowoThat...
代码星球 ·2020-08-09

1030 Travel Plan (30分)(dijkstra 具有多种决定因素)

Atraveler'smapgivesthedistancesbetweencitiesalongthehighways,togetherwiththecostofeachhighway.Nowyouaresupposedtowriteaprogramtohelpatravelertodecidetheshortest...
首页上一页12345下一页尾页