Function to obtain the maximum Flow
def getMaxFlow ( capi : List [ List [ int ] ] , costi : List [ List [ int ] ] , src : int , sink : int ) -> List [ int ] : NEW_LINE INDENT global cap , cost , found , dist , pi , N , flow , dad NEW_LINE cap = capi NEW_LINE cost = costi NEW_LINE N = len ( capi ) NEW_LINE found = [ False for _ in range ( N ) ] NEW_LINE flow = [ [ 0 for _ in range ( N ) ] for _ in range ( N ) ] NEW_LINE dist = [ INF for _ in range ( N + 1 ) ] NEW_LINE dad = [ 0 for _ in range ( N ) ] NEW_LINE pi = [ 0 for _ in range ( N ) ] NEW_LINE totflow = 0 NEW_LINE totcost = 0 NEW_LINE DEDENT