about summary refs log tree commit diff
path: root/day14.k
blob: 995bcfbcd20b2aa37b2b30a93736821c0c55e092 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
d:0:"day14";
t:2503;

ss:{1 _' (&y=y,x) _ y,x}; / split x at y
l:ss[;" "]' d;

r:+{t#((0$x@6)#0$x@3),(0$x@13)#0}'l; / incremental distance at second

|/+/r
|/+/{x=|/x}'+\r