英语翻译
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
邮箱:联系方式: