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:
e8f1a6a
)
08: rotate maps rather than mirroring
author
Ben Harris
<bjh21@bjh21.me.uk>
Wed, 8 May 2024 13:29:16 +0000
(14:29 +0100)
committer
Ben Harris
<bjh21@bjh21.me.uk>
Wed, 8 May 2024 13:29:16 +0000
(14:29 +0100)
This is now consistent across 08a and 08b.
08/08a.bqn
patch
|
blob
|
history
08/08b.bqn
patch
|
blob
|
history
diff --git
a/08/08a.bqn
b/08/08a.bqn
index 51fb5af1994201beadee6bb8b4cdb4929ea52429..ea6501838826928c75c9a6f0ad721f253a8f3781 100644
(file)
--- a/
08/08a.bqn
+++ b/
08/08a.bqn
@@
-1,4
+1,4
@@
Main←{𝕊in:
- +´⥊∨´{{∊⌈`𝕩}˘⌾𝕏in}¨⟨⊢,⌽
˘,⍉,⌽˘⍉
⟩
+ +´⥊∨´{{∊⌈`𝕩}˘⌾𝕏in}¨⟨⊢,⌽
⍉,⌽⌽˘,⍉⌽
⟩
}
•Show Main '0'-˜>•file.Lines ⊑•args
diff --git
a/08/08b.bqn
b/08/08b.bqn
index dd75f5d4e9d391fabe982cd36b2be383940cb225..d2021a082222517e5ff98ae46f7560e50cf8ad49 100644
(file)
--- a/
08/08b.bqn
+++ b/
08/08b.bqn
@@
-1,5
+1,5
@@
Main←{𝕊in:
DirScores←{>{+˝((1↓≢𝕩)⥊1)»∧`(⊏𝕩)⊸>˘1↓𝕩}¨¯1↓↓𝕩}
- ⌈´⥊×´{DirScores⌾𝕏in}¨⟨⊢,⌽
,⍉,⌽⍉
⟩
+ ⌈´⥊×´{DirScores⌾𝕏in}¨⟨⊢,⌽
⍉,⌽⌽˘,⍉⌽
⟩
}
•Show Main '0'-˜>•file.Lines ⊑•args