• 「CF412E」E – mail Addresses

    「CF412E」E - mail Addresses

    OneofthemostimportantproductsoftheR1companyisapopular@r1.commailservice.TheR1mailboxesreceiveandsendmillionsofemailseveryday.Today,theonlinenewsthunderedwithterribleinformation.TheR1databasecrashedandalmostnodatacouldbesavedexceptforonebigstring.ThedevelopersassumethatthestringcontainsthelettersofsomeusersoftheR1mail.Recoveringlettersisatediousmostlymanualwork.Sobeforeyoustartthisproces...

    02014年4月19日2,832模拟
  • 「CF412C」Pattern

    「CF412C」Pattern

    Developersoftenfacewithregularexpressionpatterns.Apatternisusuallydefinedasastringconsistingofcharactersandmetacharactersthatsetstherulesforyoursearch.Thesepatternsaremostoftenusedtocheckwhetheraparticularstringmeetsthecertainrules.Inthistask,apatternwillbeastringconsistingofsmallEnglishlettersandquestionmarks('?').Thequestionmarkinthepatternisametacharacterthatdenotesanarbitrarysmalllettero...

    02014年4月19日2,179模拟
  • 「CF412B」Network Configuration

    「CF412B」Network Configuration

    TheR1companywantstoholdawebsearchchampionship.Therewere n computersgivenforthecompetition,eachofthemisconnectedtotheInternet.Theorganizersbelievethatthedatatransferspeeddirectlyaffectstheresult.ThehigherthespeedoftheInternetis,thefastertheparticipantwillfindthenecessaryinformation.Therefore,beforethecompetitionstarted,eachcomputerhaditsmaximumpossibledatatransferspeedmeasured.Onthe i-t...

    02014年4月19日2,400模拟
  • 「CF412A」Poster

    「CF412A」Poster

    TheR1companyhasrecentlyboughtahighrisebuildinginthecentreofMoscowforitsmainoffice.It'stimetodecoratethenewoffice,andthefirstthingtodoistowritethecompany'ssloganabovethemainentrancetothebuilding.Thesloganofthecompanyconsistsof n characters,sothedecoratorshungalargebanner, n meterswideand 1 meterhigh,dividedinto n equalsquares.Thefirstcharacterofthesloganmustbeinthefirstsquare(theleftm...

    02014年4月19日2,320模拟
  • 「CF417C」Football

    「CF417C」Football

    Oneday,atthe"RussianCodeCup"eventitwasdecidedtoplayfootballasanoutofcompetitionevent.Allparticipantswasdividedinto n teamsandplayedseveralmatches,twoteamscouldnotplayagainsteachothermorethanonce.TheappointedJudgewasthemostexperiencedmember—Pavel.Butsincehewasthewisestofall,hesoongotboredofthegameandfellasleep.Wakingup,hediscoveredthatthetournamentisoverandtheteamswanttoknowtheresultso...

    02014年4月19日2,361模拟
  • 「CF417B」Crash

    「CF417B」Crash

    Duringthe"RussianCodeCup"programmingcompetition,thetestingsystemstoresallsentsolutionsforeachparticipant.Weknowthatmanyparticipantsuserandomnumbersintheirprogramsandareoftensentseveralsolutionswiththesamesourcecodetocheck.Eachparticipantisidentifiedbysomeuniquepositiveinteger k,andeachsentsolution A ischaracterizedbytwonumbers: x —thenumberofdifferentsolutionsthataresentbeforethefirst...

    02014年4月19日2,045模拟
  • 「BZOJ1689」[Usaco2005 Open] Muddy roads 泥泞的路

    「BZOJ1689」[Usaco2005 Open] Muddy roads 泥泞的路

    DescriptionFarmerJohnhasaproblem:thedirtroadfromhisfarmtotownhassufferedintherecentrainstormsandnowcontains(1<=N<=10,000)mudpools.FarmerJohnhasacollectionofwoodenplanksoflengthLthathecanusetobridgethesemudpools.Hecanoverlapplanksandtheendsdonotneedtobeanchoredontheground.However,hemustcovereachpoolcompletely.Giventhemudpools,helpFJfigureouttheminimumnumberofplanksheneedsinorderto...

    02014年4月16日3,518贪心
  • 「BZOJ1639」[Usaco2007 Mar] Monthly Expense 月度开支

    「BZOJ1639」[Usaco2007 Mar] Monthly Expense 月度开支

    DescriptionFarmerJohn是一个令人惊讶的会计学天才,他已经明白了他可能会花光他的钱,这些钱本来是要维持农场每个月的正常运转的。他已经计算了他以后N(1<=N<=100,000)个工作日中每一天的花费moneyi(1<=moneyi<=10,000),他想要为他连续的M(1<=M<=N)个被叫做“清算月”的结帐时期做一个预算,每一个“清算月”包含一个工作日或更多连续的工作日,每一个工作日都仅被包含在一个“清算月”当中。FJ的目...

    02014年4月16日4,213二分法
  • 「BZOJ1816」[CQOI2010] 扑克牌

    「BZOJ1816」[CQOI2010] 扑克牌

    Description你有n种牌,第i种牌的数目为ci。另外有一种特殊的牌:joker,它的数目是m。你可以用每种牌各一张来组成一套牌,也可以用一张joker和除了某一种牌以外的其他牌各一张组成1套牌。比如,当n=3时,一共有4种合法的套牌:{1,2,3},{J,2,3},{1,J,3},{1,2,J}。给出n,m和ci,你的任务是组成尽量多的套牌。每张牌最多只能用在一副套牌里(可以有牌不使用)。Input第一行包含两个整数n,m,即牌的种数和joker的个数。第二行包含...

    42014年4月15日4,333二分法
  • 「BZOJ1621」[Usaco2008 Open] Roads Around The Farm分岔路口

    「BZOJ1621」[Usaco2008 Open] Roads Around The Farm分岔路口

    Description    约翰的N(1≤N≤1,000,000,000)只奶牛要出发去探索牧场四周的土地.她们将沿着一条路走,一直走到三岔路口(可以认为所有的路口都是这样的).这时候,这一群奶牛可能会分成两群,分别沿着接下来的两条路继续走.如果她们再次走到三岔路口,那么仍有可能继续分裂成两群继续走.    奶牛的分裂方式十分古怪:如果这一群奶牛可以精确地分成两部分,这两部分的牛数恰好相差K(1≤K≤1000),那么在三岔路口牛...

    02014年4月15日2,381模拟
  • 「CF415C」Mashmokh and Numbers

    「CF415C」Mashmokh and Numbers

    It'sholiday.Mashmokhandhisboss,Bimokh,areplayingagameinventedbyMashmokh.InthisgameMashmokhwritessequenceof n distinctintegersontheboard.ThenBimokhmakesseveral(possiblyzero)moves.Onthefirstmoveheremovesthefirstandthesecondintegerfromfromtheboard,onthesecondmoveheremovesthefirstandthesecondintegeroftheremainingsequencefromtheboard,andsoon.Bimokhstopswhentheboardcontainslessthantwonumbers...

    02014年4月7日3,673构造,筛法
  • 「CF415A」Mashmokh and Lights

    「CF415A」Mashmokh and Lights

    Mashmokhworksinafactory.Attheendofeachdayhemustturnoffallofthelights.Thelightsonthefactoryareindexedfrom 1 to n.Thereare n buttonsinMashmokh'sroomindexedfrom 1 to n aswell.IfMashmokhpushesbuttonwithindex i,theneachlightwithindexnotlessthani thatisstillturnedonturnsoff.Mashmokhisnotveryclever.Soinsteadofpushingthefirstbuttonhepushessomeofthebuttonsrandomlyeachnight.Hepushed m ...

    02014年4月7日2,058模拟
30 / 41 « 上一页 1 ...28 29 30 31 32 ...41 下一页 »