• 「POJ3480」John

    「POJ3480」John

    DescriptionLittleJohnisplayingveryfunnygamewithhisyoungerbrother.ThereisonebigboxfilledwithM&Msofdifferentcolors.AtfirstJohnhastoeatseveralM&Msofthesamecolor.Thenhisopponenthastomakeaturn.Andsoon.PleasenotethateachplayerhastoeatatleastoneM&Mduringhisturn.IfJohn(orhisbrother)willeatthelastM&Mfromtheboxhewillbeconsideredasalooserandhewillhavetobuyanewcandybox.Both...

    02014年3月11日4,078博弈论
  • 「POJ2068」Nim

    「POJ2068」Nim

    DescriptionLet'splayatraditionalgameNim.YouandIareseatedacrossatableandwehaveahundredstonesonthetable(weknowthenumberofstonesexactly).Weplayinturnandateachturn,youorIcanremoveontofourstonesfromtheheap.Youplayfirstandtheonewhoremovedthelaststoneloses.Inthisgame,youhaveawinningstrategy.Toseethis,youfirstremovefourstonesandleave96stones.NomatterhowIplay,Iwillendupwithleaving92-95stones.T...

    02014年3月11日3,470博弈论,记忆化搜索
  • 「POJ2960」S – Nim

    「POJ2960」S - Nim

    DescriptionArthurandhissisterCarollhavebeenplayingagamecalledNimforsometimenow.Nimisplayedasfollows:Thestartingpositionhasanumberofheaps,allcontainingsome,notnecessarilyequal,numberofbeads.Theplayerstaketurnschosingaheapandremovingapositivenumberofbeadsfromit.Thefirstplayernotabletomakeamove,loses.ArthurandCarollreallyenjoyedplayingthissimplegameuntiltheyrecentlylearnedaneasywaytoalwaysb...

    02014年3月11日4,386博弈论
  • 「POJ2484」A Funny Game

    「POJ2484」A Funny Game

    DescriptionAliceandBobdecidetoplayafunnygame.Atthebeginningofthegametheypickn(1<=n<=106)coinsinacircle,asFigure1shows.Amoveconsistsinremovingoneortwoadjacentcoins,leavingallothercoinsuntouched.Atleastonecoinmustberemoved.PlayersalternatemoveswithAlicestarting.Theplayerthatremovesthelastcoinwins.(Thelastplayertomovewins.Ifyoucan'tmove,youlose.)Figure1Note:Forn>3,weusec1,c2,....

    02014年3月10日2,918博弈论
  • 「POJ2505」A multiplication game

    「POJ2505」A multiplication game

    DescriptionStanandOllieplaythegameofmultiplicationbymultiplyinganintegerpbyoneofthenumbers2to9.Stanalwaysstartswithp=1,doeshismultiplication,thenOlliemultipliesthenumber,thenStanandsoon.Beforeagamestarts,theydrawaninteger1<n<4294967295andthewinneriswhofirstreachesp>=n.InputEachlineofinputcontainsoneintegernumbern.OutputForeachlineofinputoutputonelineeitherStanwins.orOlliewins...

    02014年3月10日3,765博弈论
  • 「POJ2425」A Chess Game

    「POJ2425」A Chess Game

    DescriptionLet'sdesignanewchessgame.ThereareNpositionstoholdMchessesinthisgame.Multiplechessescanbelocatedinthesameposition.Thepositionsareconstitutedasatopologicalgraph,i.e.therearedirectededgesconnectingsomepositions,andnocycleexists.TwoplayersyouandImovechessesalternately.Ineachturntheplayershouldmoveonlyonechessfromthecurrentpositiontooneofitsout-positionsalonganedge.Thegamedoesnote...

    02014年3月10日2,769博弈论
  • 「POJ2975」Nim

    「POJ2975」Nim

    DescriptionNimisa2-playergamefeaturingseveralpilesofstones.Playersalternateturns,andonhis/herturn,aplayer’smoveconsistsofremoving oneormorestones fromanysinglepile.Playendswhenallthestoneshavebeenremoved,atwhichpointthelastplayertohavemovedisdeclaredthewinner.GivenapositioninNim,yourtaskistodeterminehowmanywinningmovesthereareinthatposition.ApositioninNimiscalled“losing”ifthefirstplay...

    02014年3月9日3,012博弈论
  • 「POJ1740」A New Stone Game

    「POJ1740」A New Stone Game

    DescriptionAliceandBobdecidetoplayanewstonegame.Atthebeginningofthegametheypickn(1<=n<=10)pilesofstonesinaline.AliceandBobmovethestonesinturn.Ateachstepofthegame,theplayerchooseapile,removeatleastonestones,thenfreelymovestonesfromthispiletoanyotherpilethatstillhasstones.Forexample:n=4andthepileshave(3,1,4,2)stones.Iftheplayerchosethefirstpileandremoveone.Thenitcanreachthefollowstat...

    02014年2月27日3,078博弈论
  • 「POJ2234」Matches Game

    「POJ2234」Matches Game

    DescriptionHereisasimplegame.Inthisgame,thereareseveralpilesofmatchesandtwoplayers.Thetwoplayerplayinturn.Ineachturn,onecanchooseapileandtakeawayarbitrarynumberofmatchesfromthepile(Ofcoursethenumberofmatches,whichistakenaway,cannotbezeroandcannotbelargerthanthenumberofmatchesinthechosenpile).Ifafteraplayer’sturn,thereisnomatchleft,theplayeristhewinner.Supposethatthetwoplayersareallverycle...

    02014年2月27日3,329博弈论
  • 「vijos1196」吃糖果游戏

    「vijos1196」吃糖果游戏

    描述Matrix67和Shadow正在做一个小游戏。桌子上放着两堆糖果,Matrix67和Shadow轮流对这些糖果进行操作。在每一次操作中,操作者需要吃掉其中一堆糖果,并且把另一堆糖果分成两堆(可以不相等)留给对方操作。游戏如此进行下去,糖果数会越来越少,最后必将出现这样一种情况:某人吃掉一堆糖果后发现另一堆里只剩一块糖果不能再分了。游戏规定此时该操作者吃掉最后这一块糖果从而取胜。这个游戏是不公平的。对于任意一种初始状...

    02013年12月19日3,731博弈论
  • 「vijos1655」萌萌的糖果博弈

    「vijos1655」萌萌的糖果博弈

    背景用糖果来引诱小朋友学习是最常用的手法,绵羊爸爸就是用糖果来引诱萌萌学习博弈的。描述他把糖果分成了两堆,一堆有A粒,另一堆有B粒。他让萌萌和他一起按照下面的规则取糖果:每次可以任意拿走其中一堆糖果;如果这时候另一堆糖果数目多于1粒,就把它任意分成两堆,否则就把剩下的一粒糖果取走并获得这次博弈的胜利。胜利者将获得所有的糖果。萌萌想要得到所有的糖果,而绵羊爸爸想把糖果留下以便下一次利用。现在由萌萌先取...

    02013年12月19日3,381博弈论
3 / 3 « 上一页 1 2 3