字典翻译 问答 其它 杭电acm1011题翻译,求大神翻译这段英文意思,我看不懂英文ProblemDescriptionYou,theleaderofStarshipTroopers,aresenttodestroyabaseofthebugs.Thebaseisbuiltunderground.Itisactuallyahugecavern,whichconsist
问题标题:
杭电acm1011题翻译,求大神翻译这段英文意思,我看不懂英文ProblemDescriptionYou,theleaderofStarshipTroopers,aresenttodestroyabaseofthebugs.Thebaseisbuiltunderground.Itisactuallyahugecavern,whichconsist
问题描述:

杭电acm1011题翻译,求大神翻译这段英文意思,我看不懂英文

ProblemDescription

You,theleaderofStarshipTroopers,aresenttodestroyabaseofthebugs.Thebaseisbuiltunderground.Itisactuallyahugecavern,whichconsistsofmanyroomsconnectedwithtunnels.Eachroomisoccupiedbysomebugs,andtheirbrainshideinsomeoftherooms.Scientistshavejustdevelopedanewweaponandwanttoexperimentitonsomebrains.Yourtaskistodestroythewholebase,andcaptureasmanybrainsaspossible.

Tokillallthebugsisalwayseasierthantocapturetheirbrains.Amapisdrawnforyou,withalltheroomsmarkedbytheamountofbugsinside,andthepossibilityofcontainingabrain.Thecavern'sstructureislikeatreeinsuchawaythatthereisoneuniquepathleadingtoeachroomfromtheentrance.Tofinishthebattleassoonaspossible,youdonotwanttowaitforthetrooperstocleararoombeforeadvancingtothenextone,insteadyouhavetoleavesometroopersateachroompassedtofightallthebugsinside.Thetroopersneverre-enteraroomwheretheyhavevisitedbefore.

Astarshiptroopercanfightagainst20bugs.Sinceyoudonothaveenoughtroopers,youcanonlytakesomeoftheroomsandletthenervegasdotherestofthejob.Atthemeantime,youshouldmaximizethepossibilityofcapturingabrain.Tosimplifytheproblem,justmaximizethesumofallthepossibilitiesofcontainingbrainsforthetakenrooms.Makingsuchaplanisadifficultjob.Youneedthehelpofacomputer.

Input

Theinputcontainsseveraltestcases.ThefirstlineofeachtestcasecontainstwointegersN(0

莫红回答:
  具体的意思我说下吧:   就是说有N个房间,M个Troopers,接下来输入的N行每行输入2个数字,第一个是每个房间Bugs的数目,第二个数字是brain的数目,结果就是要你尽可能的多得到brain,下面再输入N-1行的两个房间号,表示这两个房间连在一起,1号房间是入口,不可以往回走(例如第一个输入数字,12,13连在一起,也就是说去了2号就不可以再去3号房间了)。
点击显示
其它推荐
热门其它推荐
  • 其它