• 「CFgym100506J」Stock

    「CFgym100506J」Stock

    Optiversponsoredproblem.AfteryearsofhardworkOptiverhasdevelopedamathematicalmodelthatallowsthemtopredictwetherornotacompanywillbesuccesful.Thisobviouslygivesthemagreatadvantageonthestockmarket.Inthepast,Optivermadeadealwithabigcompany,whichforcesthemtobuysharesofthecompanyaccordingtoafixedschedule.Unfortunately,Optiver’smodelhasdeterminedthatthecompanywillgobankruptafterexactlyndays,after...

    02014年10月18日2,491贪心
  • 「CF478C」Table Decorations

    「CF478C」Table Decorations

    Youhaverred,ggreenandbblueballoons.Todecorateasingletableforthebanquetyouneedexactlythreeballoons.Threeballoonsattachedtosometableshouldn'thavethesamecolor.Whatmaximumnumbertoftablescanbedecoratedifweknownumberofballoonsofeachcolor?Yourtaskistowriteaprogramthatforgivenvaluesr,gandbwillfindthemaximumnumbertoftables,thatcanbedecoratedintherequiredmanner.InputThesinglelinecontainsthreeintegers...

    02014年10月17日3,521贪心
  • 「BZOJ3410」[Usaco2009 Dec] Selfish Grazing 自私的食草者

    「BZOJ3410」[Usaco2009 Dec] Selfish Grazing 自私的食草者

    Description    约翰有N(1≤N≤50000)头牛,约翰的草地可以认为是一条直线.每只牛只喜欢在某个特定的范围内吃草.第i头牛喜欢在区间(Si,Ei)吃草,1≤Si<Ei≤1,000,000,00.    奶牛们都很自私,他们不喜欢和其他奶牛共享自己喜欢吃草的领域,因此约翰要保证任意两头牛都不会共享他们喜欢吃草昀领域.如果奶牛i和奶牛J想要同时吃草,那么要满足:Si>=Ej或者Ei≤Sj.约翰想知道在同一时刻,最多可以有多少...

    02014年9月28日2,716贪心
  • NOI2010 超级钢琴

    NOI2010 超级钢琴

    Description小Z是一个小有名气的钢琴家,最近C博士送给了小Z一架超级钢琴,小Z希望能够用这架钢琴创作出世界上最美妙的音乐。这架超级钢琴可以弹奏出n个音符,编号为1至n。第i个音符的美妙度为Ai,其中Ai可正可负。一个“超级和弦”由若干个编号连续的音符组成,包含的音符个数不少于L且不多于R。我们定义超级和弦的美妙度为其包含的所有音符的美妙度之和。两个超级和弦被认为是相同的,当且仅当这两个超级和弦所包含的音...

    22014年9月28日7,415贪心,ST表
  • 「CF471B」MUH and Important Things

    「CF471B」MUH and Important Things

    It'stimepolarbearsMenshykovandUsladafromthezooofSt.PetersburgandelephantHoracefromthezooofKievgotdowntobusiness.Intotal,therearentasksforthedayandeachanimalshoulddoeachofthesetasks.Foreachtask,theyhaveevaluateditsdifficulty.Alsoanimalsdecidedtodothetasksinorderoftheirdifficulty.Unfortunately,sometaskscanhavethesamedifficulty,sotheorderinwhichonecanperformthetasksmayvary.Menshykov,Usla...

    02014年9月27日3,860贪心
  • 「BZOJ3433」[Usaco2014 Jan] Recording the Moolympics

    「BZOJ3433」[Usaco2014 Jan] Recording the Moolympics

    DescriptionBeingafanofallcold-weathersports(especiallythoseinvolvingcows),FarmerJohnwantstorecordasmuchoftheupcomingwinterMoolympicsaspossible.ThetelevisionschedulefortheMoolympicsconsistsofNdifferentprograms(1<=N<=150),eachwithadesignatedstartingtimeandendingtime.FJhasadual-tunerrecorderthatcanrecordtwoprogramssimultaneously.Pleasehelphimdeterminethemaximumnumberofprogramshecanr...

    02014年9月25日3,497贪心
  • 「BZOJ3709」[PA2014] Bohater

    「BZOJ3709」[PA2014] Bohater

    Description在一款电脑游戏中,你需要打败n只怪物(从1到n编号)。为了打败第i只怪物,你需要消耗d[i]点生命值,但怪物死后会掉落血药,使你恢复a[i]点生命值。任何时候你的生命值都不能降到0(或0以下)。请问是否存在一种打怪顺序,使得你可以打完这n只怪物而不死掉Input第一行两个整数n,z(1<=n,z<=100000),分别表示怪物的数量和你的初始生命值。接下来n行,每行两个整数d[i],a[i](0<=d[i],a[i]<=100000)Output第...

    12014年9月13日7,501贪心
  • 「CF464A」No to Palindromes!

    「CF464A」No to Palindromes!

    Paulhatespalindromes.HeassumesthatstringsistolerableifeachitscharacterisoneofthefirstplettersoftheEnglishalphabetandsdoesn'tcontainanypalindromecontiguoussubstringoflength2ormore.Paulhasfoundatolerablestringsoflengthn.Helphimfindthelexicographicallynexttolerablestringofthesamelengthorelsestatethatsuchstringdoesnotexist.InputThefirstlinecontainstwospace-separatedintegers:nandp(1 ≤ n ≤ ...

    32014年9月8日5,233贪心
  • 「BZOJ1034」[ZJOI2008] 泡泡堂BNB

    「BZOJ1034」[ZJOI2008] 泡泡堂BNB

    Description 第XXXX届NOI期间,为了加强各省选手之间的交流,组委会决定组织一场省际电子竞技大赛,每一个省的代表队由n名选手组成,比赛的项目是老少咸宜的网络游戏泡泡堂。每一场比赛前,对阵双方的教练向组委会提交一份参赛选手的名单,决定了选手上场的顺序,一经确定,不得修改。比赛中,双方的一号选手,二号选手……,n号选手捉对厮杀,共进行n场比赛。每胜一场比赛得2分,平一场得1分,输一场不得分。最终将双方的...

    02014年9月2日5,303贪心
  • 「CF461A」Appleman and Toastman

    「CF461A」Appleman and Toastman

    ApplemanandToastmanplayagame.InitiallyApplemangivesonegroupof n numberstotheToastman,thentheystarttocompletethefollowingtasks:EachtimeToastmangetsagroupofnumbers,hesumsupallthenumbersandaddsthissumtothescore.ThenhegivesthegrouptotheAppleman.EachtimeApplemangetsagroupconsistingofasinglenumber,hethrowsthisgroupout.EachtimeApplemangetsagroupconsistingofmorethanonenumber,hesplitsthegrou...

    02014年8月26日2,753贪心
  • 善良的hzwer

    善良的hzwer

    同公主的工作由于本题难度太高,善良的hzwer说:“为了方便旅客串门,还是将他们的房间安排为相邻的一排为好233。”对于每一天输出一行依次代表选取的房间高度,房间必须相邻,若不能安排则输出Impossible。(为了减少输出所需时间,只需输出第一个数即可)因为在做wulala的神模拟赛的时候题目看错了就出了这么一题TT做法是求出每个点为开头向后的连续上升序列长度然后可以搞一个答案数组TT,比如以字典序最小的数x1开头的长度为a...

    02014年8月17日2,767贪心,单调栈
  • 「NOIP模拟赛by wulala」公主的游戏

    「NOIP模拟赛by wulala」公主的游戏

    wulala:不就一傻逼贪心吗……就是把公主的wulala的牌都排序一下然后贪心。。。我只排序wulala的牌,然后把公主的牌放进平衡树TT每次找后继不过有了set这样并不会比正解难写,反倒是更为直接2333[crayon-66060920317c5801487133/] ...

    22014年8月16日2,736贪心
10 / 15 « 上一页 1 ...8 9 10 11 12 ...15 下一页 »