• 「BZOJ1088」[SCOI2005] 扫雷Mine

    「BZOJ1088」[SCOI2005] 扫雷Mine

    Description相信大家都玩过扫雷的游戏。那是在一个n*m的矩阵里面有一些雷,要你根据一些信息找出雷来。万圣节到了,“余”人国流行起了一种简单的扫雷游戏,这个游戏规则和扫雷一样,如果某个格子没有雷,那么它里面的数字表示和它8连通的格子里面雷的数目。现在棋盘是n×2的,第一列里面某些格子是雷,而第二列没有雷,如下图:由于第一列的雷可能有多种方案满足第二列的数的限制,你的任务即根据第二列的信息确定第一列雷有多少...

    02014年3月13日4,778模拟
  • 「CF401B」Sereja and Contests

    「CF401B」Sereja and Contests

    SerejaisacoderandhelikestotakepartinCodesorfesrounds.However,Uzhlanddoesn'thavegoodinternetconnection,soSerejasometimesskipsrounds.Codesorfeshasroundsoftwotypes: Div1 (foradvancedcoders)and Div2 (forbeginnercoders).Tworounds, Div1 and Div2,cangosimultaneously,(Div1 roundcannotbeheldwithout Div2)inallothercasestheroundsdon'toverlapintime.Eachroundhasauniqueidentifier—apositi...

    02014年3月11日3,489模拟
  • 「CF401A」Vanya and Cards

    「CF401A」Vanya and Cards

    Vanyalovesplaying.Heevenhasaspecialsetofcardstoplaywith.Eachcardhasasingleinteger.Thenumberonthecardcanbepositive,negativeandcanevenbeequaltozero.Theonlylimitis,thenumberoneachcarddoesn'texceed x intheabsolutevalue.Natashadoesn'tlikewhenVanyaspendsalongtimeplaying,soshehidallofhiscards.Vanyabecamesadandstartedlookingforthecardsbutheonlyfound n ofthem.Vanyalovesthebalance,sohewantsthes...

    02014年3月11日1,997模拟
  • 归并排序

    归并排序

    学了一下归并排序[crayon-662ed808ad934024892309/] 

    02014年3月6日2,544模拟
  • 「CF400B」Inna and New Matrix of Candies

    「CF400B」Inna and New Matrix of Candies

    Innalikessweetsandagamecalledthe"CandyMatrix".Today,shecameupwiththenewgame"CandyMatrix2:Reload".Thefieldforthenewgameisarectangletableofsize n × m.Eachlineofthetablecontainsonecellwithadwarffigurine,onecellwithacandy,theothercellsofthelineareempty.Thegamelastsforseveralmoves.Duringeachmovetheplayercanchoose alllinesofthematrixwheredwarfisnotonthecellwithcandy andshout"Let'sgo!"....

    02014年3月6日2,075模拟
  • 「CF400A」Inna and Choose Options

    「CF400A」Inna and Choose Options

    Therealwaysissomethingtochoosefrom!Andnow,insteadof"NoughtsandCrosses",Innachooseaveryunusualupgradeofthisgame.Therulesofthegamearegivenbelow:Thereisonepersonplayingthegame.Beforethebeginningofthegameheputs12cardsinarowonthetable.Eachcardcontainsacharacter:"X"or"O".Thentheplayerchoosestwopositiveintegers a and b (a·b = 12),afterthathemakesatableofsize a × b fromthecardshepu...

    02014年3月6日2,624模拟
  • 「CF399B」Red and Blue Balls

    「CF399B」Red and Blue Balls

    Useraintahasastackof n redandblueballs.Hecanapplyacertainoperationwhichchangesthecolorsoftheballsinsidethestack.Whilethetopballinsidethestackisred,poptheballfromthetopofthestack.Thenreplacetheblueballonthetopwitharedball.Andfinallypushsomeblueballstothestackuntilthestackhastotalof n ballsinside.Iftherearenoblueballsinsidethestack,aintacan'tapplythisoperation.Giventheinitialstateofthesta...

    02014年3月2日3,974模拟
  • 「CF399A」Pages

    「CF399A」Pages

    Useraintaismakingawebsite.Thistimeheisgoingtomakeanavigationofthepages.Inhissite,thereare n pagesnumberedbyintegersfrom 1 to n.Assumethatsomebodyisonthe p-thpagenow.Thenavigationwilllooklikethis:  << p - k p - k + 1 ... p - 1 (p) p + 1 ... p + k - 1 p + k >>Whensomeoneclicksthebutton"<<"heisredirectedtopage 1,andwhensomeoneclicksth...

    02014年3月2日2,233模拟
  • 「CF397A」On Segment’s Own POInts

    「CF397A」On Segment's Own POInts

    OuroldfriendAlexeyhasfinallyenteredtheUniversityofCityN—theBerlandcapital.AlexeyexpectedhisfathertogethimaplacetoliveinbuthisfathersaiditwashightimeforAlexeytopracticesomefinancialindependence.So,Alexeyislivinginadorm.Thedormhasexactlyonestraightdryer—a 100 centimeterlongropetohangclotheson.Thedryerhasgotacoordinatesysteminstalled:theleftmostendofthedryerhascoordinate 0,andtheoppo...

    02014年3月1日2,277模拟
  • 「CODEVS1108」方块游戏

    「CODEVS1108」方块游戏

    题目描述 Description  有红(R)、绿(G)、蓝(B)、黑(A)、白(W)五种颜色的方块放在一个M*N(M,N<=50)的方框中。现要求消去同色相连大于3的所有方块。消去过程为:一次同时消去同一直线上(横、竖、斜线)同色相连大于、等于3的块。在消去过程中,同一方块可在不同方向上重复使用。方块消去后,上面的块自动下落,重复消去过程,直至不能消去为止。输入描述 InputDescription输入文件game.in格式:第一...

    02014年2月4日2,303模拟
  • 「vijos1093」文科生的悲哀

    「vijos1093」文科生的悲哀

    背景化学不及格的Matrix67无奈选择了文科。他必须硬着头皮准备一次又一次的文科考试。描述在这一学期一共有n次文科考试,考试科目有4种,分别为政治、历史、地理和综合。每次考哪一科是不定的,因此在考试前Matrix67不知道应该去复习哪一科的功课。他希望能预测出下一次可能考的科目。于是,他收集到了以往的文科考试的资料。从以往的考试中,他发现了这样几个规律:1.如果这次考的是政治,那么下一次一定会考历史;2.如果这次考...

    02014年1月28日2,677模拟
  • 「JoyOI1081」最近距离

    「JoyOI1081」最近距离

    题目描述 在一块地上,有着n(1<=n<=2000) 头牛,输入n,再分别输入这n头牛的坐标(x,y)(1<=x<=100000,1<=y<=100000),如果第i头牛与第j头牛间的距离最近,那么输出i和j10 | . . . . . . . 3 . . . . .9 | . 1 . . 2 . . . . . . . .8 | . . . . . . . . . . . . .7 | . . . . . . . . . . 4 . .6 | . . . . . . 9 . . . . . .5 | . ...

    02014年1月27日2,525模拟
13 / 18 « 上一页 1 ...11 12 13 14 15 ...18 下一页 »