题目描述DescriptionWelcometotheHungaryGames!ThestreetsofBudapestformatwistednetworkofone-waystreets.欢迎来到匈牙利游戏!布达佩斯(匈牙利首都)的街道形成了一个弯曲的单向网络。Youhavebeenforcedtojoinaraceaspartofa“RealityTV”showwhereyouracethroughthesestreets,startingattheSz´echenyithermalbath(sforshort)andendingattheTombofG¨ulBaba(tforshort).你被强制要求参加一个赛跑作为一个TV秀的...
Greghasaweigheddirectedgraph,consistingof n vertices.Inthisgraphanypairofdistinctverticeshasanedgebetweentheminbothdirections.Greglovesplayingwiththegraphandnowhehasinventedanewgame:Thegameconsistsof n steps.Onthe i-thstepGregremovesvertexnumber xi fromthegraph.AsGregremovesavertex,healsoremovesalltheedgesthatgoinandoutofthisvertex.Beforeexecutingeachstep,Gregwantstoknowthesumofle...
近期评论