Skip to content

Commit

Permalink
Day 17 solution.
Browse files Browse the repository at this point in the history
  • Loading branch information
jayfoad committed Jan 2, 2019
1 parent 29b6764 commit e4d491a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions p17.dyalog
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
⎕IO0
c¨p⎕NGET'p17.txt'1
p¨¨'\d+'⎕S'&'¨p
a b(/,/)1¨p/c='x'
g(1+b)1000''
to{+-}
{g[[1] to 1+[2];[0]]'#'}¨p/c='x'
{g[[0];[1] to 1+[2]]'#'}¨p/c='y'
d{x y tyg[;x] n1t'#~' g[y+n;x]'|' _f(n<t'|')x(y+n-1)}
e{x y txyg x+(-1t)(t1)}
f{x y i j'| 'e +0 1 k l'#'e g[y;(ik)to jl]'|~'/ti l>k j /t:-0 1 d¨y,¨t/(i-1)j}
d 500 0
+/,'|~'ag part 1
+/,'~'=ag part 2

0 comments on commit e4d491a

Please sign in to comment.