• 【cf534X】Codeforces Round #298 (Div. 2)

    【cf534X】Codeforces Round #298 (Div. 2)

    【cf534A】Examyy个奇怪的构造TT[crayon-58afadbb4661a825435472/]【cf534B】CoveredPathd很小,最大速度就很小,dp即可[crayon-58afadbb4662a066690505/]【cf534C】Polycarpus'Dice对于每个骰子,得出其它骰子的和sum则它的最小值为A-sum,最大值为A-n+1[crayon-58afadbb46633093300537/]【cf534D】Handshakes尽量大的能处理则处理[crayon-58afadbb4663b136080621/]【cf534E】BerlandLocalPositioningSystem非...

  • 【cf508E】Arthur and Brackets

    【cf508E】Arthur and Brackets

    Noticethatthememorylimitisnon-standard.RecentlyArthurandSashahavestudiedcorrectbracketsequences.Arthurunderstoodthistopicperfectlyandbecomesoamazedaboutcorrectbracketsequences,soheevengothimselfafavoritecorrectbracketsequenceoflength2n.UnlikeArthur,Sashaunderstoodthetopicverybadly,andbrokeArthur'sfavoritecorrectbracketsequencejusttospitehim.AllArthurremembersabouthisfavoritesequenceisfo...

    02015年1月28日858构造
  • 【uoj #5】怎样提高智商

    【uoj #5】怎样提高智商

    大力水手最近和他的女朋友奥利弗分手了,他感到人生非常灰暗,于是上山来找禅师解惑。大力水手问禅师:“大师,奥利弗以前经常说我是个笨蛋,让我觉得很生气。大概是因为我真的太笨了她才这么说吧。请问,怎样才能提高智商?”禅师浅笑,答:“方法很简单,不过若想我教你,你先看看这张试卷。”大力水手拿到试卷,共有n道选择题,编号为1到n。第i道题形如:(hi为“A”或“B”或“C”或“D”,ai,bi,ci,di都是整数)i.编号小于...

    02015年1月18日768构造
  • 【codechef】January Challenge 2015

    【codechef】January Challenge 2015

    CHEFSTON[crayon-58afadbb48354175731249/]GCDQgcd满足区间加法TAT,所以维护前缀和后缀和就好了[crayon-58afadbb48362661251515/]SEAVOTE去掉所有0后若∑bi<tot或∑bi>=100+n则无解否则有解[crayon-58afadbb4836b755460177/]ONEKING按照右端点排序,选择第一个的右端点,删去覆盖其的线段。。。剩下的线段同理[crayon-58afadbb48379342726394/]CLPERM答案根据第一个不能合成的数奇偶性得...

  • 【cf477B】Dreamoon and Sets

    【cf477B】Dreamoon and Sets

    Dreamoonlikestoplaywithsets,integersand.isdefinedasthelargestpositiveintegerthatdividesbothaandb.LetSbeasetofexactlyfourdistinctintegersgreaterthan0.DefineStobeofrankkifandonlyifforallpairsofdistinctelementssi,sjfromS,.Givenkandn,Dreamoonwantstomakeupnsetsofrankkusingintegersfrom1tomsuchthatnointegerisusedintwodifferentsets(ofcourseyoucanleavesomeintegerswithoutuse).Calculatetheminimummth...

    02014年10月13日1,173构造
  • 【cf459C】Pashmak and Buses

    【cf459C】Pashmak and Buses

    RecentlyPashmakhasbeenemployedinatransportationcompany.Thecompanyhas k busesandhasacontractwithaschoolwhichhas n students.Theschoolplannedtotakethestudentsto d differentplacesfor d days(eachdayinoneplace).Eachdaythecompanyprovidesallthebusesforthetrip.Pashmakhastoarrangethestudentsinthebuses.Hewantstoarrangethestudentsinawaythatnotwostudentsbecomeclosefriends.Inhisridiculousidea,tw...

    02014年8月16日991构造
  • 【cf452B】4-point polyline

    【cf452B】4-point polyline

    Youaregivenarectangulargridoflatticepointsfrom (0, 0) to (n, m) inclusive.Youhavetochooseexactly4differentpointstobuildapolylinepossiblywithself-intersectionsandself-touching.Thispolylineshouldbeaslongaspossible.Apolylinedefinedbypoints p1, p2, p3, p4 consistsofthelinesegments p1 p2, p2 p3, p3 p4,anditslengthisthesumofthelengthsoftheindividuallinesegments.InputTheonlylineoft...

    02014年7月28日742构造
  • 【cf439C】Devu and Partitioning of the Array

    【cf439C】Devu and Partitioning of the Array

    Devubeingasmallkid,likestoplayalot,butheonlylikestoplaywitharrays.Whileplayinghecameupwithaninterestingquestionwhichhecouldnotsolve,canyoupleasesolveitforhim?Givenanarrayconsistingofdistinctintegers.Isitpossibletopartitionthewholearrayinto k disjointnon-emptypartssuchthat p ofthepartshaveevensum(eachofthemmusthaveevensum)andremaining k - p haveoddsum?(notethatpartsneednottobecontinuous...

    02014年6月5日999构造
  • 【cf430A】Points and Segments (easy)

    【cf430A】Points and Segments (easy)

    Iahubisn'twellpreparedongeometryproblems,butheheardthatthisyeartherewillbealotofgeometryproblemsontheIOIselectioncamp.Scared,Iahublockedhimselfinthebasementandstartedthinkingofnewproblemsofthiskind.Oneofthemisthefollowing.Iahubwantstodraw n distinctpointsand m segmentsonthe OX axis.Hecandraweachpointwitheitherredorblue.Thedrawingisgoodifandonlyifthefollowingrequirementismet:forea...

    02014年5月12日1,043构造
  • 【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日1,128构造,筛法
2 / 2 « 上一页 1 2