Greghasaweigheddirectedgraph,consistingof n vertices.Inthisgraphanypairofdistinctverticeshasanedgebetweentheminbothdirections.Greglovesplayingwiththegraphandnowhehasinventedanewgame:Thegameconsistsof n steps.Onthe i-thstepGregremovesvertexnumber xi fromthegraph.AsGregremovesavertex,healsoremovesalltheedgesthatgoinandoutofthisvertex.Beforeexecutingeachstep,Gregwantstoknowthesumofle...
近期评论