From 0251f56575fe83bcfb8b31165caf56d8ab001306 Mon Sep 17 00:00:00 2001 From: sterni Date: Sat, 3 Dec 2022 16:47:00 +0100 Subject: feat(sterni/aoc/2022): day03 solution Change-Id: I0f23d4d6405779fe7e804eb8b9f407dc4de88760 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7502 Tested-by: BuildkiteCI Reviewed-by: sterni Autosubmit: sterni --- users/sterni/exercises/aoc/2022/03/3.bqn | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 users/sterni/exercises/aoc/2022/03/3.bqn (limited to 'users/sterni') diff --git a/users/sterni/exercises/aoc/2022/03/3.bqn b/users/sterni/exercises/aoc/2022/03/3.bqn new file mode 100644 index 000000000000..642fccd45034 --- /dev/null +++ b/users/sterni/exercises/aoc/2022/03/3.bqn @@ -0,0 +1,8 @@ +i ← •FLines •path∾"/input" +c ← ∾(↕26)⊸+¨"aA" +P ← {1+⊑c⊐⊑𝕩} +S ← (∊/⊣) +G ← ((⊣/(↕÷˜⟜≠))⊔⊢) + +•Out "day03.1: "∾•Fmt +´(P S˝)¨2‿∘⊸⥊¨i +•Out "day03.2: "∾•Fmt +´3(P S´)¨∘G i -- cgit 1.4.1