about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-12-06 15:04:11 +0100
committerLeah Neukirchen <leah@vuxu.org>2020-12-06 15:04:11 +0100
commitad5dd89ea90c3198d41a3b35250b4d8cd7af564d (patch)
tree1432b9660a62021f5f0b44b3fab68d58ca37b5e8
parenta2037e84ec9dd2ee9ad1528d94a5e4451a0fd41a (diff)
downloadadventofcode2020-ad5dd89ea90c3198d41a3b35250b4d8cd7af564d.tar.gz
adventofcode2020-ad5dd89ea90c3198d41a3b35250b4d8cd7af564d.tar.xz
adventofcode2020-ad5dd89ea90c3198d41a3b35250b4d8cd7af564d.zip
day05
-rw-r--r--day05770
-rw-r--r--day05.clj8
-rw-r--r--day05.ijs2
3 files changed, 780 insertions, 0 deletions
diff --git a/day05 b/day05
new file mode 100644
index 0000000..686c9e0
--- /dev/null
+++ b/day05
@@ -0,0 +1,770 @@
+FFBFBBBRLR
+BBFFBFFRRR
+BFFFFBBRRR
+FFBFFBBLRR
+FFBFBFBLLL
+FFBFFBFLRR
+BFFFBBBLLR
+FFBFBFFRLR
+FFBFFFBRRR
+FFBFFFFRRL
+BFFBBFFLRL
+FFFBFFBLRR
+FBBFBFFRLR
+BFFFBFBRLR
+BFBFFBBRLR
+FFBBFBBLRR
+BFBBBFBRLR
+FFBBBFBRRL
+FFBFBBBRRR
+BFBBBBFRLL
+FBBFFFBRRR
+BFFBFBFRRR
+FFBFBBBLRL
+FBFFFFBLLR
+BBFFBFBRLL
+FBBBFFBLRL
+FBBBFFFRRR
+BFBFFBFRLR
+BFFFFBBLLL
+FBFFBBFRLR
+BFBBBBBLLR
+FFFFBBFLRR
+FBFBFBFRLR
+FBFFBFFLRR
+FFBFFBFRRR
+BFFBFBFRLL
+BFFFBBBLRR
+FFBBFFFLLR
+FBBBFBBLRR
+FFBBFBFRRL
+BFFBFFBRLL
+FBFFFBBLLR
+BFFFBFBLRL
+FFFBFBBRRL
+FBBBFBBRLL
+BFFBBBFRLL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BLLL
+FFFBBBBLRL
+BBFFBFFLRL
+FBFFFFFRRL
+FFBFBBBLLR
+FBBFFFFRLR
+FFBBBFFRRL
+FBBFBFFLLR
+FBFBFFFRRL
+FBBFFFFRLL
+BFBBBFFRLL
+BBFFFFBRRR
+BFBFBBBRRR
+FBFFFBBRLR
+BFFFFBFRLL
+FFBFBFBRLL
+FBBFBFBRLL
+FBBFBBFRLR
+FFFBFFFRLL
+BFBBFBFRLL
+FBBBFFBRLR
+FFFBBFFRRR
+FBBFFFBLLR
+FBBBBBBRLR
+FFBBBBBLRL
+FBBFBFFLRL
+BFBFFFBRRL
+FBFBFFFLLL
+FFBBFBFRLL
+BFBFFBBLRR
+FBFFBBBLLL
+FBFBBFFRRR
+BFFFBBBRRR
+BFBBBBBLRR
+FBBFBBBLLR
+FFFBBFFLRL
+FBBFFBBRRL
+FFBBFBFRLR
+BFBFBFFLRL
+BFBBFBFLLR
+FBFBBBBLRR
+BFFFFBFLLL
diff --git a/day05.clj b/day05.clj
new file mode 100644
index 0000000..f165d11
--- /dev/null
+++ b/day05.clj
@@ -0,0 +1,8 @@
+(def data
+  (->> (slurp "day05")
+       (clojure.string/split-lines)
+       (map (fn [x] (reduce #(+ (* 2 %1) %2)
+                            (map {\F 0, \B 1, \L 0, \R 1} x))))))
+
+(apply max data) ; => 818
+(apply min (remove (set data) (map inc data))) ; => 559
diff --git a/day05.ijs b/day05.ijs
new file mode 100644
index 0000000..1aa5068
--- /dev/null
+++ b/day05.ijs
@@ -0,0 +1,2 @@
+>./d=.#.(e.&'BR';._2)1!:1<'day05'  NB. 818
+<./d-.~>:d  NB. 559