当前位置 :
杭电acm1011题翻译,求大神翻译这段英文意思,我看不懂英文ProblemDescriptionYou,theleaderofStarshipTroopers,aresenttodestroyabaseofthebugs.Thebaseisbuiltunderground.Itisactuallyahugecavern,whichconsist
1人问答
问题描述:

杭电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号房间了)。
最新更新
PC端 | 移动端 | mip端
字典翻译(zidianfy.com)汇总了汉语字典,新华字典,成语字典,组词,词语,在线查字典,中文字典,英汉字典,在线字典,康熙字典等等,是学生查询学习资料的好帮手,是老师教学的好助手。
声明:本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
电话:  邮箱:
Copyright©2009-2021 字典翻译 zidianfy.com 版权所有 闽ICP备2022014709号-7
lyric 頭條新聞