about summary refs log tree commit diff
path: root/day11.ijs
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-12-12 21:20:20 +0100
committerLeah Neukirchen <leah@vuxu.org>2020-12-12 21:20:20 +0100
commitcc9dc71b287c001b1dc5f61a59a770d805d65659 (patch)
tree1eabac5d9b475f4e75d6361157d5208a81e906d6 /day11.ijs
parente294402b6a64c2d09d6bc68f868c43f3ba63ea52 (diff)
downloadadventofcode2020-cc9dc71b287c001b1dc5f61a59a770d805d65659.tar.gz
adventofcode2020-cc9dc71b287c001b1dc5f61a59a770d805d65659.tar.xz
adventofcode2020-cc9dc71b287c001b1dc5f61a59a770d805d65659.zip
day11
Diffstat (limited to 'day11.ijs')
-rw-r--r--day11.ijs5
1 files changed, 5 insertions, 0 deletions
diff --git a/day11.ijs b/day11.ijs
new file mode 100644
index 0000000..1a9fbd5
--- /dev/null
+++ b/day11.ijs
@@ -0,0 +1,5 @@
+d =: ([;._2) 1!:1<'day11'
+neigh =: '#'&= -~ [: +/"1 [: +/"2 '#' = 3 3 >;._3 '.'&([,[,~[,.[,.~])
+step =: '.L#' {~ ([: -(3<[)*'#'=]) + (2*'#'=]) + ((0=[) * 'L'=]) + 'L'=]
++/,'#'=(neigh step ])^:_ d  NB. 2324
+NB. part2 TBD