chiark
/
gitweb
/
~bjharris
/
aoc-2022.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14135ae
)
03b done
author
Ben Harris
<bjh21@bjh21.me.uk>
Fri, 3 May 2024 09:26:10 +0000
(10:26 +0100)
committer
Ben Harris
<bjh21@bjh21.me.uk>
Fri, 3 May 2024 09:26:10 +0000
(10:26 +0100)
Still don't really understand the interaction of ˝ and ˘ though.
03/03b.bqn
[new file with mode: 0644]
patch
|
blob
diff --git a/03/03b.bqn
b/03/03b.bqn
new file mode 100644
(file)
index 0000000..
9a52f2a
--- /dev/null
+++ b/
03/03b.bqn
@@ -0,0
+1,10
@@
+Group←{⟨∘,3⟩⥊𝕩}
+Intersect←{(𝕨∊𝕩)/𝕨} # Find elements of 𝕨 that are in 𝕩.
+
+PriorityLC←{( 1+𝕩-'a')×(𝕩≥'a')∧(𝕩≤'z')}
+PriorityUC←{(27+𝕩-'A')×(𝕩≥'A')∧(𝕩≤'Z')}
+Priority←PriorityLC+PriorityUC
+
+Main←{+´(Priority (⊑Intersect´)¨<˘Group𝕩)}
+
+•Show Main •file.Lines ⊑•args