summaryrefslogtreecommitdiffstats
path: root/19/py
diff options
context:
space:
mode:
Diffstat (limited to '19/py')
-rw-r--r--19/py/d18.pngbin0 -> 263667 bytes
-rw-r--r--19/py/d18.py6
2 files changed, 4 insertions, 2 deletions
diff --git a/19/py/d18.png b/19/py/d18.png
new file mode 100644
index 0000000..23aa332
--- /dev/null
+++ b/19/py/d18.png
Binary files differ
diff --git a/19/py/d18.py b/19/py/d18.py
index 61a5cb0..41ade0a 100644
--- a/19/py/d18.py
+++ b/19/py/d18.py
@@ -220,6 +220,7 @@ for path, dist in start_paths.items():
m = 0
while True:
+ print(cur)
cur = heap.heappop(h)
dist = cur[0]
last = cur[1]
@@ -234,8 +235,9 @@ while True:
neighbours = graph[last]
for n in neighbours:
- if n[0] in visited:
- continue
+ #TODO recognize cycles
+ #if n[0] in visited:
+ # continue
if n[0].isupper() and n[0] not in unlocked:
continue
visited = visited.copy()