about summary refs log tree commit diff
path: root/day18.ijs
blob: 7f3edf6aae05d25186797b1f8c5ad2e9a0190bb1 (plain) (blame)
1
2
3
4
5
6
7
8
load 'aoc.ijs'
d =: lines 'day18'

ev1 =: ".@|.@('())('&stringreplace)
+/ev1 every d  NB. 3159145843816

ev2 =: ".@('((((((','))))))',~[)@(('+';')+(';'*';'))*((';'(';'((';')';'))')&stringreplace)
+/ev2 every d   NB. 55699621957369