• 任务调度

    任务调度

    来源:http://nnsznoi.openjudge.cn/greedy/0014/ Description一个单位时间任务是一个作业,如要在计算机上运行一个程序,它恰覆盖一个单位的运行时间。给定一个单位时间任务的集合S,对S的一个调度即S的一个排列,其中规定了这些任务的执行顺序。该调度中的第一个任务开始于时间0,结束于时1;第二个任务开始于时间1,结束于时间2;……。单处理器上具有期限和罚款的单位时间任务调度问题的输入如下:1.包含n个单位时间任务的集合S={...

    02014年4月25日3,585贪心
  • 「CF417D」Cunning Gena

    「CF417D」Cunning Gena

    AboynamedGenareallywantstogettothe"RussianCodeCup"finals,oratleastgetat-shirt.Buttheofferedproblemsaretoocomplex,sohemadeanarrangementwithhis n friendsthattheywillsolvetheproblemsforhim.Theparticipantsareoffered m problemsonthecontest.Foreachfriend,Genaknowswhatproblemshecansolve.ButGena'sfriendswon'tagreetohelpGenafornothing:the i-thfriendasksGena xi rublesforhishelp insolvin...

    02014年4月25日3,506状压动规
  • 「CF413E」Maze 2D

    「CF413E」Maze 2D

    ThelastproductoftheR2companyinthe2Dgames'fieldisanewrevolutionaryalgorithmofsearchingfortheshortestpathina 2 × nmaze.Imagineamazethatlookslikea 2 × n rectangle,dividedintounitsquares.Eachunitsquareiseitheranemptycelloranobstacle.Inoneunitoftime,apersoncanmovefromanemptycellofthemazetoanyside-adjacentemptycell.Theshortestpathproblemisformulatedasfollows.Giventwofreemazecells,younee...

    42014年4月24日4,502线段树
  • NOIP2011多项式系数

    NOIP2011多项式系数

    题目描述求(ax+by)^k的展开中x^n*y^m项的系数。由于系数可能很大,只要求输出除以10007的余数。输入一行共五个整数,分别为a,b,k,n,m输出一个整数,为该项系数除以10007的余数。样例输入11312样例输出3提示数据范围:30%0<=k<=10,50%a=1,b=1100%0<=k<=1000,0<=n,m<=k且n+m=k,0<=a,b<=100,000NOIP2011DAY2factor代码2013.11.6[crayon-67a72d255f3bd433713691/]2014.4.24乘法逆元可以用于求C[crayon...

    12014年4月24日6,210排列组合,乘法逆元
  • 「CF421A」Pasha and Hamsters

    「CF421A」Pasha and Hamsters

    Pashahastwohamsters:ArthurandAlexander.Pashaput n applesinfrontofthem.PashaknowswhichapplesArthurlikes.Similarly,PashaknowswhichapplesAlexanderlikes.Pashadoesn'twantanyconflictbetweenthehamsters(astheymaylikethesameapple),sohedecidedtodistributetheapplesbetweenthehamstersonhisown.HeisgoingtogivesomeapplestoArthurandsomeapplestoAlexander.Itdoesn'tmatterhowmanyappleseachhamstergetsbu...

    02014年4月23日2,351模拟
  • 「CF420B」Online Meeting

    「CF420B」Online Meeting

    NearlyeachprojectoftheFcompanyhasawholeteamofdevelopersworkingonit.Theyoftenareindifferentroomsoftheofficeindifferentcitiesandevencountries.Tokeepintouchandtracktheresultsoftheproject,theFcompanyconductssharedonlinemeetingsinaSpykechat.OnedaythedirectoroftheFcompanygotholdoftherecordsofapartofanonlinemeetingofonesuccessfulteam.Thedirectorwatchedtherecordandwantedtotalktotheteamleader.But...

    02014年4月23日2,288模拟
  • 「CF420A」Start Up

    「CF420A」Start Up

    Recently,astartupbytwostudentsofastateuniversityofcityFgainedincrediblepopularity.Nowit'stimetostartanewcompany.Butwhatdowecallit?Themarketanalystscameupwithaverysmartplan:thenameofthecompanyshouldbeidenticaltoitsreflectioninamirror!Inotherwords,ifwewriteoutthenameofthecompanyonapieceofpaperinaline(horizontally,fromlefttoright)withlargeEnglishletters,thenputthispieceofpaperinfrontofthemirro...

    02014年4月23日3,000模拟
  • 「BZOJ1972」[SDOI2010] 猪国杀

    「BZOJ1972」[SDOI2010] 猪国杀

    题目描述 Description《猪国杀》是一种多猪牌类回合制游戏,一共有三种角色:主猪,忠猪,反猪。每局游戏主猪有且只有一只,忠猪和反猪可以有多只,每只猪扮演一种角色。游戏目的:主猪(MP):自己存活的情况下消灭所有的反猪。忠猪(ZP):不惜一切保护主猪,胜利条件与主猪相同。反猪(AP):杀死主猪。游戏过程:游戏开始时候,每个玩家手里都会有4张牌,且体力上限和初始体力都是4。开始游戏时,从主猪开始,按照逆时...

    22014年4月23日8,871模拟
  • 「BZOJ1874」[BJ2009 WinterCamp] 取石子游戏

    「BZOJ1874」[BJ2009 WinterCamp] 取石子游戏

    Description小H和小Z正在玩一个取石子游戏。取石子游戏的规则是这样的,每个人每次可以从一堆石子中取出若干个石子,每次取石子的个数有限制,谁不能取石子时就会输掉游戏。小H先进行操作,他想问你他是否有必胜策略,如果有,第一步如何取石子。Input输入文件的第一行为石子的堆数N接下来N行,每行一个数Ai,表示每堆石子的个数接下来一行为每次取石子个数的种类数M接下来M行,每行一个数Bi,表示每次可以取的石子个数...

    02014年4月21日4,768博弈论
  • 「BZOJ1033」[ZJOI2008] 杀蚂蚁antbuster

    「BZOJ1033」[ZJOI2008] 杀蚂蚁antbuster

    Description最近,佳佳迷上了一款好玩的小游戏:antbuster。游戏规则非常简单:在一张地图上,左上角是蚂蚁窝,右下角是蛋糕,蚂蚁会源源不断地从窝里爬出来,试图把蛋糕搬回蚂蚁窝。而你的任务,就是用原始资金以及杀蚂蚁获得的奖金造防御塔,杀掉这些试图跟你抢蛋糕的蚂蚁~下附一张游戏截图: 为了拿到尽可能高的分数,佳佳设计了很多种造塔的方案,但在尝试了其中的一小部分后,佳佳发现,这个游戏实在是太费时间了。为了节省...

    32014年4月21日8,171模拟
  • 「BZOJ3196」JoyOI 1730 二逼平衡树

    「BZOJ3196」JoyOI 1730 二逼平衡树

    Description您需要写一种数据结构(可参考题目标题),来维护一个有序数列,其中需要提供以下操作:1.查询k在区间内的排名2.查询区间内排名为k的值3.修改某一位值上的数值4.查询k在区间内的前驱(前驱定义为小于x,且最大的数)5.查询k在区间内的后继(后继定义为大于x,且最小的数)Input第一行两个数n,m表示长度为n的有序序列和m个操作第二行有n个数,表示有序序列下面有m行,opt表示操作标号若opt=1则为操作1,之后有三个数l,r,k表...

    02014年4月20日11,480树套树,treap,线段树
  • 「CF413C」Jeopardy!

    「CF413C」Jeopardy!

    'Jeopardy!'isanintellectualgamewhereplayersanswerquestionsandearnpoints.CompanyQconductsasimplified'Jeopardy!'tournamentamongthebestITcompanies.Byaluckycoincidence,theoldrivalsmadeittothefinals:companyR1andcompanyR2.Thefinalswillhave n questions, m ofthemareauctionquestionsand n - m ofthemareregularquestions.Eachquestionhasaprice.Thepriceofthe i-thquestionis ai points.Durin...

    02014年4月20日2,677贪心
99 / 145 « 上一页 1 ...97 98 99 100 101 ...145 下一页 »