复制代码 代码如下:
_*_coding:utf8
import sys
import os
class Graph():
def init(self, V, E):
self.V = V
self.E = E
self.visited = []
self.dict = {}
self.fd = open("input.txt")
def initGraph(self):
self.visited = [0 for i in range(self.V+1)]
for i in range(self.E):
f, t = map(int, self.fd.readline().split(...