DescriptionThecityexecutiveboardinLundwantstoconstructasightseeingtourbybusinLund,sothattouristscanseeeverycornerofthebeautifulcity.Theywanttoconstructthetoursothateverystreetinthecityisvisitedexactlyonce.Thebusshouldalsostartandendatthesamejunction.Asinanycity,thestreetsareeitherone-wayortwo-way,trafficrulesthatmustbeobeyedbythetourbus.Helptheexecutiveboardanddetermineifit'spossibletocons...
Givenaweighteddirectedgraph,wedefinetheshortestpathasthepathwhohasthesmallestlengthamongallthepathconnectingthesourcevertextothetargetvertex.Andiftwopathissaidtobenon-overlapping,itmeansthatthetwopathhasnocommonedge.So,givenaweighteddirectedgraph,asourcevertexandatargetvertex,weareinterestedinhowmanynon-overlappingshortestpathcouldwefindoutatmost.InputInputconsistsofmultipletestcases.Thefirs...
近期评论