summaryrefslogtreecommitdiffstats
path: root/19
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2019-12-18 20:42:42 +0100
committerGustav Sörnäs <gusso230@student.liu.se>2019-12-18 20:42:42 +0100
commitf6442664931bff2f37027a0d0eaf706017b5537d (patch)
tree8ec99f538f0fe3ed2aa94081c8b43a1e25dac69d /19
parent0d473b23584e9f8e87856db167d285cd899347a4 (diff)
downloadaoc-f6442664931bff2f37027a0d0eaf706017b5537d.tar.gz
More day 18 WIP
Diffstat (limited to '19')
-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()