若已知一个栈的入栈序列是1,2,3,…,n,其输出序列为p1,p2,p3,…,pn,若p1=n,则pi为n-i+1。
Achildwhohasoncebeenpleasedwithatalelikes,asarule,tohaveitretoldinalmostthesamewords,butthisshouldnotleadparentstotreatprintedfairystoriesasformaltexts.Itisalwaysmuchbettertotellastorythanreaditoutofabook,and,ifaparentcanproducewhat,intheactualsituationofthetimeandthechild,isanimprovementontheprintedtext,somuchthebetter.Achargemadeagainstfairytalesisthattheyharmthechildbyfrighteninghimormakinghimsadthinking.Toprovethelatter,onewouldhavetoshowinacontrolledexperimentthatchildrenwhohavereadfairystoriesweremoreoftensorryforcrueltythanthosewhohadnot.Astofears,thereare,Ithink,somecasesofchildrenbeingdangerouslyterrifiedbysomefairystory.Often,however,thisarises(出现)fromthechildhavingheardthestoryonce.Familiaritywiththestorybyrepetitionturnsthepainoffearintothepleasureofafearfacedandmastered.Therearealsopeoplewhoobjecttofairystoriesonthegroundsthattheyarenotobjectivelytrue,thatgiants,witches,two-headeddragons,magiccarpets,etc.donotexist;andthat,insteadofbeingfondofthestrangesideinfairytales,thechildshouldbetaughttolearntherealitybystudyinghistory.Ifindsuchpeople,Imustsaysopeculiar(奇怪的)thatIdonotknowhowtoarguewiththem.Iftheircaseweresound,theworldshouldbefullofmadmenattemptingtoflyfromNewYorktoPhiladelphiaonastickorcoveringatelephonewithkissesinthebeliefthatitwastheirbelovedgirl-friend.Nofairystoryeverdeclaredtobeadescriptionoftherealworldandnocleverchildhaseverbelievedthatitwas.1.Theauthorconsidersthatafairystoryismoreeffectivewhenitis_______.
以下程序的输出结果是()。img1=[12,34,56,78]img2=[1,2,3,4,5]defdispl():print(img1)defmodi():img1=img2modi()displ()