summaryrefslogtreecommitdiffstats
path: root/1.py
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2021-12-03 16:56:16 +0000
committerTomasz Kramkowski <tk@the-tk.com>2021-12-03 16:56:54 +0000
commitd75a9d510ced0a29ad2fe7ebc247dc7b0766320c (patch)
tree3bf55422bf79ce41ac62e20da7906321c2ec8992 /1.py
parentb5d1f2d79bb61afd9b03621282b7bff5f29a75f1 (diff)
downloadaoc2021-d75a9d510ced0a29ad2fe7ebc247dc7b0766320c.tar.gz
aoc2021-d75a9d510ced0a29ad2fe7ebc247dc7b0766320c.tar.xz
aoc2021-d75a9d510ced0a29ad2fe7ebc247dc7b0766320c.zip
Implement open_day utility function
Diffstat (limited to '1.py')
-rw-r--r--1.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/1.py b/1.py
index 2cc64a1..afd445d 100644
--- a/1.py
+++ b/1.py
@@ -1,5 +1,5 @@
-from utils import sliding_window
+from utils import open_day, sliding_window
-inp: list[int] = list(map(int, open('1.in')))
+inp: list[int] = list(map(int, open_day(1)))
print(sum(s[0] < s[1] for s in sliding_window(inp, 2)))
print(sum(s[0] < s[3] for s in sliding_window(inp, 4)))