• 「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日4,127构造
  • 「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日3,097构造
  • 「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日3,563构造
  • 「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日3,615构造
  • 「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,622构造,筛法
3 / 3 « 上一页 1 2 3