def p082(matrix=None): if not matrix: matrix = p081.readmatrix(filename) g = buildgraph(matrix) return g.shortestpath('source', 'sink')
def p083(matrix=None): if not matrix: matrix = p081.readmatrix(filename) g = buildgraph(matrix) return g.shortestpath((0,0), (len(matrix)-1,len(matrix[0])-1))
def p083(matrix=None): if not matrix: matrix = p081.readmatrix(filename) g = buildgraph(matrix) return g.shortestpath((0, 0), (len(matrix) - 1, len(matrix[0]) - 1))