Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Two Step solution in Clear category for Network Attack by Tinus_Trotyl
def capture(matrix):
size = len(matrix)
hitime = sum([matrix[i][i] for i in range(size)])
infect = [hitime for i in range(size)]
infect[0] = 0
for n in range(2):
for i in range(size):
for j in range(1, size):
if i == j:
continue
if matrix[i][j]:
infect[j] = min(infect[j], infect[i] + matrix[j][j])
return(max(infect))
Jan. 15, 2022
Comments: