当前位置 :
英语翻译DescriptionThemultiplicationpuzzleisplayedwitharowofcards,eachcontainingasinglepositiveinteger.Duringthemoveplayertakesonecardoutoftherowandscoresthenumberofpointsequaltotheproductofthenumberontheca
1人问答
更新时间:2024-04-19 00:42:35
问题描述:

英语翻译

Description

Themultiplicationpuzzleisplayedwitharowofcards,eachcontainingasinglepositiveinteger.Duringthemoveplayertakesonecardoutoftherowandscoresthenumberofpointsequaltotheproductofthenumberonthecardtakenandthenumbersonthecardsontheleftandontherightofit.Itisnotallowedtotakeoutthefirstandthelastcardintherow.Afterthefinalmove,onlytwocardsareleftintherow.

Thegoalistotakecardsinsuchorderastominimizethetotalnumberofscoredpoints.

Forexample,ifcardsintherowcontainnumbers10150205,playermighttakeacardwith1,then20and50,scoring

10*1*50+50*20*5+10*50*5=500+5000+2500=8000

Ifhewouldtakethecardsintheoppositeorder,i.e.50,then20,then1,thescorewouldbe

1*50*20+1*20*5+10*1*5=1000+100+50=1150.

Input

ThefirstlineoftheinputcontainsthenumberofcardsN(3

金巍回答:
  描述:   乘法游戏是用一排卡片玩的,每张卡片上有一个正整数.在游戏中玩家取出一张卡片记下得分,得分等于他取出的卡片及其左边、右边相邻卡片上的三个整数的乘积.第一张和最后一张卡片不允许取出.取出最后一张卡片后,原来的一排卡片就只剩下了两张.   游戏的目标就是获得的分数最少.   例如有一排卡片,分数分别是10150205,玩家可能先取1,然后是20,最后是50,得分就是:10*1*50+50*20*5+10*50*5=500+5000+2500=8000   如果他按相反的顺序来取,即50、20、1,得分就是:   1*50*20+1*20*5+10*1*5=1000+100+50=1150.   ---------------------   输入   输入的第一行包括卡片的数目N(3
最新更新
PC端 | 移动端 | mip端
问答网(wenda2.com)汇总了汉语字典,新华字典,成语字典,组词,词语,在线查字典,中文字典,英汉字典,在线字典,康熙字典等等,是学生查询学习资料的好帮手,是老师教学的好助手。
声明:本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。

邮箱:联系方式:

Copyright©2009-2021 问答网 wenda2.com 版权所有 闽ICP备2022000227号-1