Skip to content

Commit

Permalink
chore: mild improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
Panadestein committed Dec 11, 2024
1 parent 3a89f4b commit 6502512
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/aoc24.org
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@ to get more context. These definitions and imports are shared by the various puz
XI ← {
inp ← •ParseFloat¨' 'Split⊑•Flines Input𝕩 ⋄ m ← •HashMap˜⟨⟩
B ← {
𝕨𝕊𝕩: m.Has𝕨‿𝕩 ? m.Get𝕨‿𝕩;
m.Has𝕨‿𝕩 ? m.Get𝕨‿𝕩;
·𝕊0: 1;
0𝕊𝕩: 𝕩{𝕩 ⊣ 𝕨m.Set𝕩}1𝕊𝕩-1;
e𝕊c: l‿r ← e (⌊∘÷⋈|˜) 10⋆⌊2÷˜d ← ⌊1+10⋆⁼e
{𝕩⊣e‿c m.Set𝕩} 2⊸|◶{𝕊: (l⊸B+r⊸B)c-1}‿{𝕊: (2024×e) B c-1} d
{𝕩⊣e‿c m.Set𝕩} 𝕊{0=𝕩 ? (l⊸𝔽+r⊸𝔽)c-1; (2024×e)𝔽c-1} 2|d
}
zwei ⇐ +´inp B¨ 75
eins ⇐ +´inp B¨ 25
Expand Down
4 changes: 2 additions & 2 deletions src/bqn/aoc24.bqn
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ X _is 10
XI ← {
inp•ParseFloat¨' 'Split⊑•Flines Input𝕩m•HashMap˜⟨⟩
B ← {
𝕨𝕊𝕩: m.Has𝕨𝕩 ? m.Get𝕨𝕩;
m.Has𝕨𝕩 ? m.Get𝕨𝕩;
·𝕊0: 1;
0𝕊𝕩: 𝕩{𝕩 𝕨m.Set𝕩}1𝕊𝕩-1;
e𝕊c: lre (÷⋈|˜) 10⋆⌊2÷˜d1+10e
{𝕩ec m.Set𝕩} 2|{𝕊: (lB+rB)c-1}‿{𝕊: (2024×e) B c-1} d
{𝕩ec m.Set𝕩} 𝕊{0=𝕩 ? (l𝔽+r𝔽)c-1; (2024×e)𝔽c-1} 2|d
}
zwei+´inp B¨ 75
eins+´inp B¨ 25
Expand Down

0 comments on commit 6502512

Please sign in to comment.