From c0e70de17a6637a2018c83429acbeba32583bd1d Mon Sep 17 00:00:00 2001 From: sterni Date: Fri, 2 Dec 2022 19:27:17 +0100 Subject: feat(sterni/aoc/2022): day02 solution It seems to me that there must be some way to improve this further, but I'm kind of out of time. Change-Id: Icf3510b6c126345551125543aec70155b6eeff4e Reviewed-on: https://cl.tvl.fyi/c/depot/+/7498 Tested-by: BuildkiteCI Reviewed-by: sterni Autosubmit: sterni --- users/sterni/exercises/aoc/2022/02/2.bqn | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 users/sterni/exercises/aoc/2022/02/2.bqn diff --git a/users/sterni/exercises/aoc/2022/02/2.bqn b/users/sterni/exercises/aoc/2022/02/2.bqn new file mode 100644 index 000000000000..65e3c817bbd2 --- /dev/null +++ b/users/sterni/exercises/aoc/2022/02/2.bqn @@ -0,0 +1,7 @@ +lib ← •Import •path∾"/../../lib.bqn" +i ← 3|"ABCXYZ"⊸⊐¨ ' ' ⊑¨∘lib.SplitOn¨ •FLines •path∾"/input" +S1 ← {1+𝕩+3×3|1+𝕩-𝕨} +S2 ← {𝕨 S1 3|𝕨+𝕩-1} + +•Out "day02.1: "∾•Fmt +´S1´¨i +•Out "day02.2: "∾•Fmt +´S2´¨i -- cgit 1.4.1