From 273503ded9bc284881c986442da8f1c29f897528 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Sat, 3 Dec 2016 22:01:55 +0100 Subject: day03: tweaks --- day03 | 2 +- day03.ijs | 7 +++++++ day03.k | 6 ++++-- day03.ok | 2 ++ 4 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 day03.ijs create mode 100644 day03.ok diff --git a/day03 b/day03 index b8e5272..79b3444 100644 --- a/day03 +++ b/day03 @@ -1908,4 +1908,4 @@ 957 170 454 466 88 293 40 813 103 - 436 766 254 + 436 766 254 \ No newline at end of file diff --git a/day03.ijs b/day03.ijs new file mode 100644 index 0000000..40a5473 --- /dev/null +++ b/day03.ijs @@ -0,0 +1,7 @@ +load 'files' + +c =: 13 : '(>./x)<(+/x)-(>./x)' +echo +/c"1".freadr'day03' +echo +/c"1,/((3%~#r),3)$"1|:r=:".freadr'day03' + +exit 0 diff --git a/day03.k b/day03.k index 58d42c0..71bc6db 100644 --- a/day03.k +++ b/day03.k @@ -1,6 +1,8 @@ -+/{h<(+/x)-h:|/x}'"i"$'(" "\'0:"day03")^\:,"" -+/{h<(+/x)-h:|/x}',/+:'0N 3 #"i"$'(" "\'0:"day03")^\:,"" ++/{h<(+/x)-h:|/x}'"i"$'(" "\'0:"day03")^\:,"" / 993 ++/{h<(+/x)-h:|/x}',/+:'0N 3 #"i"$'(" "\'0:"day03")^\:,"" / 1849 / thanks to John Earnest +/{h<(+/x)-h:|/x}'.:'0:"day03" +/{h<(+/x)-h:|/x}',/+:'0N 3 #.:'0:"day03" + +\\ diff --git a/day03.ok b/day03.ok new file mode 100644 index 0000000..188ef95 --- /dev/null +++ b/day03.ok @@ -0,0 +1,2 @@ ++/{h<(+/x)-h:|/x}'.:' 0:"day03" ++/{h<(+/x)-h:|/x}',/+:'0N 3 #.:' 0:"day03" -- cgit 1.4.1