308
правок
Изменения
м
→Реализация
d[i][mask] = '''min'''(d[i][mask], ''findCheapest''(j, mask - 2 ** j) + w(i, j))
'''return''' d[i][mask]
'''for''' i = 0 .. n - 1
'''for''' mask = 0 .. 2 ** n - 1
i = 0
mask = 2 ** n - 1
path.'''push'''(0)
'''while''' mask != 0
'''for''' j = 0 .. n - 1