题目来源:http://dapractise.openjudge.cn/2019hwall/POJ3436ACMComputerFactory[crayon-670ec5a6f2c5f056337770/]POJ2112OptimalMilking[crayon-670ec5a6f2c6f913498037/]POJ1274ThePerfectStall用邻接矩阵写的[crayon-670ec5a6f2c78487265328/]POJ1269IntersectingLines[crayon-670ec5a6f2c7f557874485/]POJ1569MyacmTriangles[crayon-670ec5a6f2c82984913807/]POJ1039Pipe[crayon-670ec5a6f2...
poj1961Periodkmp求出fail数组后,前i个的重复子串就是i-fail(i)[crayon-670ec5a701bad592125255/]poj1276 CashMachine用f(i,j)表示前i种面值,达到j的面值和,所需要的第i种钞票的最少数量[crayon-670ec5a701bb6273000317/]poj1702 Eva'sBalance先把n转为3进制,若p位为2,就在左盘放3^p,进位若p位为1,就在右盘放3^p[crayon-670ec5a701bbc719759478/]poj1273 DrainageDitches大名鼎鼎的草地排水,网络流模板[crayon-6...
DescriptionThecityexecutiveboardinLundwantstoconstructasightseeingtourbybusinLund,sothattouristscanseeeverycornerofthebeautifulcity.Theywanttoconstructthetoursothateverystreetinthecityisvisitedexactlyonce.Thebusshouldalsostartandendatthesamejunction.Asinanycity,thestreetsareeitherone-wayortwo-way,trafficrulesthatmustbeobeyedbythetourbus.Helptheexecutiveboardanddetermineifit'spossibletocons...
Givenaweighteddirectedgraph,wedefinetheshortestpathasthepathwhohasthesmallestlengthamongallthepathconnectingthesourcevertextothetargetvertex.Andiftwopathissaidtobenon-overlapping,itmeansthatthetwopathhasnocommonedge.So,givenaweighteddirectedgraph,asourcevertexandatargetvertex,weareinterestedinhowmanynon-overlappingshortestpathcouldwefindoutatmost.InputInputconsistsofmultipletestcases.Thefirs...
近期评论