From: Ben Harris Date: Thu, 2 May 2024 13:30:43 +0000 (+0100) Subject: 02a and 02b done X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=387a978c2958f5c14a679c269d44067d841f49d9;p=aoc-2022.git 02a and 02b done --- diff --git a/02/02a.bqn b/02/02a.bqn new file mode 100644 index 0000000..2994b15 --- /dev/null +++ b/02/02a.bqn @@ -0,0 +1,11 @@ +scoretable ← [ + ⟨ 3+1, 6+2, 0+3 ⟩ + ⟨ 0+1, 3+2, 6+3 ⟩ + ⟨ 6+1, 0+2, 3+3 ⟩ +] + +Prep←{-⟜⟨'A','X'⟩¨(⟨0,2⟩⊸⊏¨𝕩)} + +Main←{+´{𝕩⊑scoretable}¨𝕩} + +•Show Main Prep •file.Lines ⊑•args diff --git a/02/02b.bqn b/02/02b.bqn new file mode 100644 index 0000000..bafdf20 --- /dev/null +++ b/02/02b.bqn @@ -0,0 +1,11 @@ +scoretable ← [ + ⟨ 0+3, 3+1, 6+2 ⟩ + ⟨ 0+1, 3+2, 6+3 ⟩ + ⟨ 0+2, 3+3, 6+1 ⟩ +] + +Prep←{-⟜⟨'A','X'⟩¨(⟨0,2⟩⊸⊏¨𝕩)} + +Main←{+´{𝕩⊑scoretable}¨𝕩} + +•Show Main Prep •file.Lines ⊑•args