about summary refs log tree commit diff
path: root/day23.ijs
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-12-24 14:37:30 +0100
committerLeah Neukirchen <leah@vuxu.org>2020-12-24 14:38:00 +0100
commit69a013313ee0399e797363bbe76d9b32747c723f (patch)
tree2f7af1cfedf969b1c87b35ce1153179bc6f0ecc4 /day23.ijs
parent4a710ae5de032f63051479b6f5953678ea3ad018 (diff)
downloadadventofcode2020-69a013313ee0399e797363bbe76d9b32747c723f.tar.gz
adventofcode2020-69a013313ee0399e797363bbe76d9b32747c723f.tar.xz
adventofcode2020-69a013313ee0399e797363bbe76d9b32747c723f.zip
day23
Diffstat (limited to 'day23.ijs')
-rw-r--r--day23.ijs11
1 files changed, 11 insertions, 0 deletions
diff --git a/day23.ijs b/day23.ijs
new file mode 100644
index 0000000..0a58d46
--- /dev/null
+++ b/day23.ijs
@@ -0,0 +1,11 @@
+d =: 10 #.inv 158937462
+
+step =: 3 : 0
+'c h t' =. ({. ; }.@(4&{.) ; 4&}.) y
+'a b' =. t ({. ; }.)~ >: {. /: (|. (<:c) |. 1+i.9) i. t
+a,h,b,c
+)
+
+,":"0}.(]|.~I.@(1&=)) step^:100 d
+
+NB. part2 TBD