summaryrefslogtreecommitdiffstats
path: root/prog/aoc/23/5/1.py
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-12-06 00:57:28 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2023-12-06 00:57:28 +0100
commit94eee506bce030b236e47ae2d90a7811d20796b5 (patch)
tree19e4961545cc09ee355142f570898e5949ab595f /prog/aoc/23/5/1.py
parentaoc5: with sweat and tears, jutrišnji bo verjetno nerešljiv (diff)
downloadr-94eee506bce030b236e47ae2d90a7811d20796b5.tar
r-94eee506bce030b236e47ae2d90a7811d20796b5.tar.gz
r-94eee506bce030b236e47ae2d90a7811d20796b5.tar.bz2
r-94eee506bce030b236e47ae2d90a7811d20796b5.tar.lz
r-94eee506bce030b236e47ae2d90a7811d20796b5.tar.xz
r-94eee506bce030b236e47ae2d90a7811d20796b5.tar.zst
r-94eee506bce030b236e47ae2d90a7811d20796b5.zip
Diffstat (limited to 'prog/aoc/23/5/1.py')
-rwxr-xr-xprog/aoc/23/5/1.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/prog/aoc/23/5/1.py b/prog/aoc/23/5/1.py
index be46b5f..a64ee26 100755
--- a/prog/aoc/23/5/1.py
+++ b/prog/aoc/23/5/1.py
@@ -44,12 +44,12 @@ for s in seeds:
l = get_next_step(l, m)
# print("l", l)
locations[s] = l
-print(min(locations.items(), key=lambda x: x[1]))
+print(min(locations.items(), key=lambda x: x[1])[1])
from interval import interval, inf
semena = interval()
for i in range(len(seeds)//2):
semena |= interval([seeds[2*i], seeds[2*i]+seeds[2*i+1]])
-print(semena)
+# print(semena)
def celoštevilski_komplement(intervala):
r = interval()
for i in range(len(intervala)):
@@ -79,4 +79,4 @@ def go_deeper(m, vhod):
return r
for i in range(len(maps)):
semena = go_deeper(maps[i], semena)
-print(semena)
+print(semena[0][0])