「cf534A」Examyy个奇怪的构造TT[crayon-67a33389b8ded613307400/]「cf534B」CoveredPathd很小,最大速度就很小,dp即可[crayon-67a33389b8df7114477831/]「cf534C」Polycarpus'Dice对于每个骰子,得出其它骰子的和sum则它的最小值为A-sum,最大值为A-n+1[crayon-67a33389b8dfc358012873/]「cf534D」Handshakes尽量大的能处理则处理[crayon-67a33389b8e00932534531/]「cf534E」BerlandLocalPositioningSystem非...
Drazilcreatedafollowingproblemaboutputting1 × 2tilesintoann × mgrid:"Thereisagridwithsomecellsthatareemptyandsomecellsthatareoccupied.Youshoulduse1 × 2tilestocoverallemptycellsandnotwotilesshouldcovereachother.Andyoushouldprintasolutionabouthowtodoit."ButDrazildoesn'tliketowritespecialcheckingprogramforthistask.Hisfriend,Vardaadvisedhim:"howaboutaskingcontestantonlytoprintthesolut...
DescriptionGivenasetofsticksofvariouslengths,isitpossibletojointhemend-to-endtoformasquare?InputThefirstlineofinputcontainsN,thenumberoftestcases.Eachtestcasebeginswithaninteger4<=M<=20,thenumberofsticks.Mintegersfollow;eachgivesthelengthofastick-anintegerbetween1and10,000.OutputForeachcase,outputalinecontaining"yes"ifisispossibletoformasquare;otherwiseoutput"no".SampleInput[cray...
近期评论