Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
journal.pop(time) solution in Clear category for Network Attack by veky
def capture(matrix):
from collections import defaultdict
rest, journal = set(range(1, len(matrix))), defaultdict(set, {0: {0}})
while journal:
time = min(journal)
for target in journal.pop(time):
rest.discard(target)
if not rest: return time
for j in rest:
if matrix[target][j]: journal[time + matrix[j][j]].add(j)
July 10, 2014
Comments: