• 「BZOJ1635」[Usaco2007 Jan] Tallest Cow 最高的牛

    「BZOJ1635」[Usaco2007 Jan] Tallest Cow 最高的牛

    DescriptionFJ'sN(1<=N<=10,000)cowsconvenientlyindexed1..Narestandinginaline.Eachcowhasapositiveintegerheight(whichisabitofsecret).YouaretoldonlytheheightH(1<=H<=1,000,000)ofthetallestcowalongwiththeindexIofthatcow.FJhasmadealistofR(0<=R<=10,000)linesoftheform"cow17seescow34".Thismeansthatcow34isatleastastallascow17,andthateverycowbetween17and34hasaheightthatisstri...

    02014年4月4日3,556模拟
  • 自幂数

    自幂数

    自幂数是指一个n位数,它的每个位上的数字的n次幂之和等于它本身。(例如:当n为3时,有1^3+5^3+3^3=153,153即是n为3时的一个自幂数)[crayon-6642f39cc1571269414840/] ...

    02014年4月1日2,266模拟
  • 「CF404A」Valera and X

    「CF404A」Valera and X

    Valeraisalittleboy.YesterdayhegotahugeMathhometaskatschool,soValeradidn'thaveenoughtimetoproperlylearntheEnglishalphabetforhisEnglishlesson.Unfortunately,theEnglishteacherdecidedtohaveatestonalphabettoday.AtthetestValeragotasquarepieceofsquaredpaper.Thelengthofthesideequals n squares(n isanoddnumber)andeachunitsquarecontainssomesmallletteroftheEnglishalphabet.Valeraneedstoknowifthe...

    02014年3月30日1,869模拟
  • 「BZOJ1666」[Usaco2006 Oct] Another Cow Number Game 奶牛的数字游戏

    「BZOJ1666」[Usaco2006 Oct] Another Cow Number Game 奶牛的数字游戏

    Description奶牛们又在玩一种无聊的数字游戏。输得很郁闷的贝茜想请你写个程序来帮她在开局时预测结果。在游戏的开始,每头牛都会得到一个数N(1<=N<=1,000,000)。此时奶牛们的分数均为0。如果N是奇数,那么奶牛就会把它乘以3后再加1。如果N是偶数,那么这个数就会被除以2。数字每变动一次,这头奶牛就得到1分。当N的值等于1时,游戏结束,此时的分数就是这头奶牛在这局游戏中的最终得分。以下是N的初始值为5时,一局游...

    02014年3月29日2,621模拟
  • 「BZOJ2241」[SDOI2011] 打地鼠

    「BZOJ2241」[SDOI2011] 打地鼠

    Description打地鼠是这样的一个游戏:地面上有一些地鼠洞,地鼠们会不时从洞里探出头来很短时间后又缩回洞中。玩家的目标是在地鼠伸出头时,用锤子砸其头部,砸到的地鼠越多分数也就越高。游戏中的锤子每次只能打一只地鼠,如果多只地鼠同时探出头,玩家只能通过多次挥舞锤子的方式打掉所有的地鼠。你认为这锤子太没用了,所以你改装了锤子,增加了锤子与地面的接触面积,使其每次可以击打一片区域。如果我们把地面看做M*N的方阵...

    12014年3月27日4,063模拟
  • 「CF405C」Unusual Product

    「CF405C」Unusual Product

    LittleChrisisahugefanoflinearalgebra.Thistimehehasbeengivenahomeworkaboutthe unusualsquare ofasquarematrix.The dotproduct oftwointegernumbervectors x and y ofsize n isthesumoftheproductsofthecorrespondingcomponentsofthevectors.The unusualsquare ofan n × n squarematrix A isdefinedasthesumof n dotproducts.The i-thofthemisthedotproductofthe i-throwvectorandthe i-thcolum...

    02014年3月23日2,172模拟
  • 「CF405B」Domino Effect

    「CF405B」Domino Effect

    LittleChrisknowsthere'snofuninplayingdominoes,hethinksit'stoorandomanddoesn'trequireskill.Instead,hedecidedtoplay with thedominoesandmakea"dominoshow".Chrisarranges n dominoesinaline,placingeachpieceverticallyupright.Inthebeginning,hesimultaneouslypushessomeofthedominoeseithertotheleftortotheright.However,somewherebetweeneverytwodominoespushedinthesamedirectionthereisatleastonedominopush...

    12014年3月23日2,584模拟
  • 「CF405A」Gravity Flip

    「CF405A」Gravity Flip

    LittleChrisisboredduringhisphysicslessons(tooeasy),sohehasbuiltatoyboxtokeephimselfoccupied.Theboxisspecial,sinceithastheabilitytochangegravity.Thereare n columnsoftoycubesintheboxarrangedinaline.The i-thcolumncontains ai cubes.Atfirst,thegravityintheboxispullingthecubesdownwards.WhenChrisswitchesthegravity,itbeginstopullallthecubestotherightsideofthebox.Thefigureshowstheinitialandfi...

    02014年3月23日2,189模拟
  • 最小字符串

    最小字符串

    「题目描述」给定一些字符串(只包含小写字母),要求将他们串起来构成一个字典序最小的字符串。 「输入格式」第一行T,表示有T组数据。接下来T组数据每组第一行一个正整数n,表示字符串个数。接下来n行,每行一个字符串(长度不超过100)。 「输出格式」T个字典序最小的字符串。 「样例输入」13abc「样例输出」abc「数据范围」对于30%的数据T<=100;对于100%的数据T<=7000,n<=100;题解[crayon-6642f39c...

    02014年3月22日3,774模拟
  • 「CF402A」Nuts

    「CF402A」Nuts

    Youhave a nutsandlotsofboxes.Theboxeshaveawonderfulfeature:ifyouput x (x ≥ 0) divisors(thespacialbarsthatcandivideabox)toit,yougetabox,dividedinto x + 1 sections.Youareminimalist.Therefore,ontheonehand,youareagainstdividingsomeboxintomorethan k sections.Ontheotherhand,youareagainstputtingmorethan v nutsintosomesectionofthebox.Whatistheminimumnumberofboxesyouhavetouseifyouwant...

    02014年3月17日2,750模拟
  • 「CF402B」Trees in a Row

    「CF402B」Trees in a Row

    TheQueenofEnglandhas n treesgrowinginarowinhergarden.Atthat,the i-th (1 ≤ i ≤ n) treefromthelefthasheight aimeters.TodaytheQueendecidedtoupdatethesceneryofhergarden.Shewantsthetrees'heightstomeetthecondition:foralli (1 ≤ i < n), ai + 1 - ai = k,where k isthenumbertheQueenchose.Unfortunately,theroyalgardenerisnotamachineandhecannotfulfillthedesireoftheQueenin...

    02014年3月17日2,319模拟
  • 「NOIP模拟赛」高级打字机

    「NOIP模拟赛」高级打字机

    高级打字机(type.cpp/c/pas)「题目描述」早苗入手了最新的高级打字机。最新款自然有着与以往不同的功能,那就是它具备撤销功能,厉害吧。请为这种高级打字机设计一个程序,支持如下3种操作:1.Tx:在文章末尾打下一个小写字母x。(type操作)2.Ux:撤销最后的x次修改操作。(Undo操作)(注意Query操作并不算修改操作)3.Qx:询问当前文章中第x个字母并输出。(Query操作)文章一开始可以视为空串。 「输入格式」第1行:一...

    92014年3月15日4,015模拟
12 / 18 « 上一页 1 ...10 11 12 13 14 ...18 下一页 »