Compare commits

...

2 Commits

Author SHA1 Message Date
rhiannon morris 442b930c41 day21 2022-12-21 18:02:33 +01:00
rhiannon morris 39c89ada3d bqn poking 2022-12-21 18:02:25 +01:00
3 changed files with 4636 additions and 4 deletions

View File

@ -2,12 +2,12 @@
Sub {ab𝕊𝕩:ba𝕩}
# e Split xs: split xs on occurrences of e (default 0)
Split {( 1¨(1)) Sub𝕩¨ (» ¨ -») /w=𝕩(w𝕨0)}
Split {( 1¨(1)) Sub𝕩¨ (» ¨ -») /w¨𝕩w𝕨0}
# n Chunk xs: split into chunks of length n (the last one might be smaller)
Chunk {(𝕨÷˜𝕩)𝕩}
Day1 ( (+´3))(+´¨)Split(•BQN0¨)•FLines
Day1 {( (+´3)) +´¨ •BQN1 "" Split •FLines 𝕩}
# ⟨ 72602 207410 ⟩
Day2 {
@ -68,8 +68,8 @@ Day10 ⇐ {
# (but the string is a big banner)
Day18 { # part 1 only :[
grid (> 1+˝) •BQN¨ '‿'(=',')0 •FLines 𝕩
touch +´ «» {(𝕎𝕩) grid} 1+3
grid (> 1+´) •BQN¨ '‿'(=',')0 •FLines 𝕩
touch +´ «» {(𝕎𝕩)grid} 1+3
+´ (6×grid)-touch
}
# 3470

2256
day21/part1.hs Normal file

File diff suppressed because it is too large Load Diff

2376
day21/part2.maude Normal file

File diff suppressed because it is too large Load Diff