Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Bruteforce solution in Clear category for Disposable Teleports by veky
nodes=set("12345678")
def solve(possible,been,am,path):
path+=am
if (am,been)==("1",nodes): return path
for dest in nodes:
edge=frozenset({am,dest})
if edge in possible:
sol=solve(possible-{edge},been|edge,dest,path)
if sol: return sol
checkio=lambda t: solve(set(map(frozenset,t.split(","))),set(),"1","")
June 25, 2013
Comments: